/* ═══════════════════════════════════
   TOKENS
   ═══════════════════════════════════ */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --text: #111;
  --text-soft: #666;
  --text-muted: #999;
  --red: #d42626;
  --rule: #eee;
  --card-border: #eee;
  --card-hover: #fafafa;
  --font: 'Outfit', -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-alt: #141111;
  --text: #f2eded;
  --text-soft: #8a7d7d;
  --text-muted: #555;
  --red: #b22222;
  --rule: #1e1e1e;
  --card-border: #251e1e;
  --card-hover: #1a1515;
}


/* ═══════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: color 0.2s, background-color 0.2s;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}


/* ═══════════════════════════════════
   LAYOUT
   ═══════════════════════════════════ */

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px;
}


/* ═══════════════════════════════════
   HEADER
   ═══════════════════════════════════ */

.site-header {
  padding: 40px 0 32px;
  display: flex;
  align-items: center;
}

.site-header__name {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.site-header__name .hi {
  color: var(--red);
}

.site-header__x {
  width: 28px;
  height: 28px;
  margin: 0 20px;
  color: var(--red);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  transition: all 0.15s;
}

.site-nav a:hover {
  text-decoration: line-through;
  opacity: 0.75;
}


/* ═══════════════════════════════════
   THEME TOGGLE
   ═══════════════════════════════════ */

.theme-toggle {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-soft);
  padding: 4px 8px;
  transition: opacity 0.2s;
}

.theme-toggle:hover {
  opacity: 0.65;
}

[data-theme="light"] .toggle-dark { display: none; }
[data-theme="dark"] .toggle-light { display: none; }


/* ═══════════════════════════════════
   HERO
   ═══════════════════════════════════ */

.hero {
  padding: 48px 0 56px;
}

.hero h1 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 20px;
}

.hero p {
  font-size: 16px;
  font-weight: 300;
  color: var(--text);
  max-width: 600px;
  line-height: 1.8;
}

.hero p a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.hero p a:hover {
  text-decoration: line-through;
}


/* ═══════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════ */

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 40px 0 24px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
}

.section-header__x {
  width: 20px;
  height: 20px;
  color: var(--red);
}

.section-header__line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}


/* ═══════════════════════════════════
   PROJECT CARDS
   ═══════════════════════════════════ */

.project {
  display: block;
  padding: 28px 32px;
  margin-bottom: 12px;
  background: var(--bg-alt);
  border-radius: 8px;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.project:hover {
  background: var(--card-hover);
  border-color: var(--card-border);
}

.project__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.project__title {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.5px;
  transition: all 0.15s;
}

.project:hover .project__title {
  text-decoration: line-through;
  opacity: 0.75;
}

.project__tag {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red);
}

.project__desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 14px;
}

.project__tech {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project__tech span {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.project__tech span::before {
  content: '·';
  margin-right: 8px;
  color: var(--red);
}

.project__tech span:first-child::before {
  content: '';
  margin-right: 0;
}


/* ═══════════════════════════════════
   ABOUT
   ═══════════════════════════════════ */

.about {
  padding: 24px 0 48px;
}

.about__content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.about__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px dashed var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.about__text p {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about__text a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
}

.about__text a:hover {
  text-decoration: line-through;
  opacity: 0.75;
}


/* ═══════════════════════════════════
   CONTACT
   ═══════════════════════════════════ */

.contact {
  padding: 24px 0 40px;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
}

.contact__row {
  display: flex;
  gap: 12px;
}

.contact__form input,
.contact__form textarea {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 300;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: var(--text);
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

.contact__form input:focus,
.contact__form textarea:focus {
  border-color: var(--red);
}

.contact__form input::placeholder,
.contact__form textarea::placeholder {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
}

.contact__form textarea {
  height: 120px;
  resize: vertical;
}

.contact__form button {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 10px 32px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  width: max-content;
  transition: opacity 0.2s;
}

.contact__form button:hover {
  opacity: 0.85;
}

.contact__status {
  font-size: 13px;
  color: var(--red);
  margin-top: 8px;
}

.hidden {
  display: none;
}


/* ═══════════════════════════════════
   SINGLE PROJECT PAGE
   ═══════════════════════════════════ */

.project-header {
  padding: 48px 0 32px;
}

.project-header__tag {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
  display: inline-block;
}

.project-header h1 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.project-header__desc {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-soft);
  line-height: 1.7;
  max-width: 600px;
}

.project-content {
  max-width: 700px;
  padding-bottom: 64px;
}

.project-content p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 1.5em;
  color: var(--text);
}

.project-content h2 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2.5em;
  margin-bottom: 0.75em;
}

.project-content a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.project-content a:hover {
  text-decoration: line-through;
}


/* ═══════════════════════════════════
   ABOUT PAGE
   ═══════════════════════════════════ */

.about-page {
  max-width: 600px;
}

.about-page__header {
  padding: 48px 0 32px;
}

.about-page__header h1 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
}

.about-page__content p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 1.5em;
  color: var(--text);
}

.about-page__content a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.about-page__content a:hover {
  text-decoration: line-through;
}


/* ═══════════════════════════════════
   FOOTER
   ═══════════════════════════════════ */

footer {
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer p {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-links a:hover {
  text-decoration: line-through;
  color: var(--text-soft);
}


/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .site-header__x {
    margin: 0 12px;
  }

  .site-nav {
    gap: 16px;
  }

  .theme-toggle {
    margin-left: 0;
  }

  .hero h1 {
    font-size: 22px;
  }

  .project {
    padding: 20px 24px;
  }

  .project__top {
    flex-direction: column;
    gap: 4px;
  }

  .about__content {
    flex-direction: column;
    gap: 20px;
  }

  .contact__row {
    flex-direction: column;
  }

  footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}


/* ═══════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  animation: fadeIn 0.5s ease both;
}
