/* ===========================
   VARIABLES & RESET
   =========================== */
:root {
  --bg:       #12100e;
  --text:     #f5ede0;
  --muted:    #b0a090;
  --green:    #39ff14;
  --border:   rgba(212, 168, 74, 0.2);

  --font-sans:    'Space Grotesk', system-ui, sans-serif;
  --font-display: 'UnifrakturCook', cursive;

  --pad: clamp(1.5rem, 5vw, 4rem);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }


/* ===========================
   NAV
   =========================== */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 1.75rem var(--pad);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s;
}

header.scrolled {
  background: rgba(18, 16, 14, 0.92);
  backdrop-filter: blur(12px);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.25rem;
}

.nav-links a {
  position: relative;
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color 0.3s;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #d4a84a;
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-home {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.3s;
  flex-shrink: 0;
}

.nav-home:hover {
  color: var(--text);
}

.nav-domain {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color 0.3s;
}


/* ===========================
   HERO
   =========================== */
#hero {
  min-height: 100vh;
  padding: 7rem var(--pad) 5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  background: #12100e;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#hero-canvas-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

#hero .hero-layout {
  position: relative;
  z-index: 1;
}

#hero .hero-name {
  color: #f5ede0;
}

.hero-role {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1.25rem;
  font-weight: 400;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
  width: 100%;
}

.hero-name {
  font-family: var(--font-sans);
  font-size: clamp(4rem, 16vw, 14rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-meta-col {
  display: flex;
  align-items: flex-start;
  padding-top: 0.75rem;
}

.hero-bio {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 280px;
}


/* ===========================
   ABOUT
   =========================== */
#about {
  padding: 6rem var(--pad) 7rem;
  border-top: 1px solid var(--border);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-hello {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.7;
  color: var(--text);
  font-weight: 400;
}

.about-details-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:first-child { border-top: 1px solid var(--border); }

.detail-label {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-value {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 400;
}


/* ===========================
   WRITING
   =========================== */
#writing {
  padding: 6rem var(--pad) 7rem;
  border-top: 1px solid var(--border);
}

.writing-header {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  margin-bottom: 3rem;
}

.writing-heading {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 0.95;
  flex-shrink: 0;
}

.writing-sub {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 300px;
}

.article-list {
  display: flex;
  flex-direction: column;
}

.article-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.2s;
  cursor: pointer;
}

.article-row:first-child { border-top: 1px solid var(--border); }

.article-row:hover { padding-left: 0.5rem; }

.article-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.article-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.article-row:hover .article-title { color: #d4a84a; }

.article-arrow {
  opacity: 0.4;
  font-size: 0.9rem;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.article-row:hover .article-arrow { opacity: 0.8; }

.article-row-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.article-tag {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d4a84a;
  background: rgba(212, 168, 74, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
}

.article-date {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-left: auto;
}

.article-excerpt {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 680px;
}


/* ===========================
   PROJECTS
   =========================== */
#projects {
  padding: 6rem var(--pad) 7rem;
  border-top: 1px solid var(--border);
}

.projects-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.projects-heading {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 0.95;
}

.projects-sub {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 1.25rem;
  max-width: 280px;
}

.projects-list {
  display: flex;
  flex-direction: column;
}

.project-row {
  display: block;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.2s;
  text-decoration: none;
}

.project-row:first-child { border-top: 1px solid var(--border); }

.project-row:hover { padding-left: 0.5rem; }

.project-row-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.project-row:hover .project-name { color: #d4a84a; }

.project-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.project-tag {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d4a84a;
  background: rgba(212, 168, 74, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
}

.project-arrow {
  opacity: 0.4;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: opacity 0.2s;
  padding-top: 0.1rem;
}

.project-row:hover .project-arrow { opacity: 0.8; }


/* ===========================
   CONTACT
   =========================== */
#contact {
  padding: 6rem var(--pad) 7rem;
  border-top: 1px solid var(--border);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-heading {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 0.95;
}

.contact-links {
  display: flex;
  flex-direction: column;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s, padding-left 0.2s;
}

.contact-link:first-child { border-top: 1px solid var(--border); }

.contact-link:hover {
  color: var(--text);
  padding-left: 0.5rem;
}

.contact-link span:last-child {
  opacity: 0.4;
  transition: opacity 0.2s;
}

.contact-link:hover span:last-child { opacity: 0.8; }


/* ===========================
   FOOTER
   =========================== */
footer {
  padding: 5rem var(--pad) 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 11vw, 8rem);
  color: var(--text);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}


/* ===========================
   FADE-IN ANIMATIONS
   =========================== */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  #hero {
    justify-content: center;
    padding-top: 6rem;
    padding-bottom: 3rem;
  }

  .hero-name {
    font-size: clamp(4.5rem, 20vw, 7rem);
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-meta-col { padding-top: 0; }

  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .writing-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav-domain { display: none; }

  footer { padding: 3rem var(--pad) 2rem; }
}
