/* ─────────────────────────────────────
   RESET & VARIABLES
───────────────────────────────────── */

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

:root {
  --bg:      #0D1B2A;
  --ink:     #EDE9E0;
  --mid:     #8A9DB5;
  --subtle:  #4E6278;
  --rule:    #1C2E3F;
  --accent:  #7BC4FF;

  --serif:   'Cormorant Garamond', 'Georgia', serif;
  --sans:    'Inter', system-ui, -apple-system, sans-serif;
  --mono:    'JetBrains Mono', 'Courier New', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

.mono {
  font-family: var(--mono);
}

/* ─────────────────────────────────────
   NAV
───────────────────────────────────── */

#nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  padding: 1.5rem 3.5rem;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  background: rgba(13, 27, 42, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--rule);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--subtle);
  transition: color 0.2s ease;
}

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

/* ─────────────────────────────────────
   HERO
───────────────────────────────────── */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3.5rem 4.5rem;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(5rem, 13vw, 11rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
  color: var(--ink);

  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 540px;

  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.hero-role {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--subtle);
}

.iv-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--subtle);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s, border-color 0.2s;
}

.iv-link:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 300;
  line-height: 1.4;
  color: var(--ink);
}

/* ─────────────────────────────────────
   MAIN LAYOUT
───────────────────────────────────── */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 3.5rem;
}

section {
  display: grid;
  grid-template-columns: 160px 1fr;
  column-gap: 5rem;
  padding: 5rem 0;
  border-top: 1px solid var(--rule);
}

.col-label {
  padding-top: 0.2rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
  line-height: 1.6;
}

.col-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--mid);
  max-width: 580px;
  margin-bottom: 1.25rem;
}

.col-content p:last-child {
  margin-bottom: 0;
}

.col-content a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s, border-color 0.2s;
}

.col-content a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ─────────────────────────────────────
   THESIS LIST
───────────────────────────────────── */

.thesis {
  list-style: none;
  max-width: 580px;
}

.thesis li {
  position: relative;
  padding: 1.15rem 0 1.15rem 1.6rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--mid);
}

.thesis li:first-child {
  border-top: 1px solid var(--rule);
}

.thesis li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--rule);
  font-family: var(--mono);
}

/* ─────────────────────────────────────
   PORTFOLIO
───────────────────────────────────── */

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 600px;
}

.portfolio-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.35rem 1.5rem 1.35rem 0;
  border-bottom: 1px solid var(--rule);
  cursor: default;
  transition: background 0.15s;
}

.portfolio-item:nth-child(odd) {
  border-right: 1px solid var(--rule);
}

.portfolio-item:nth-child(even) {
  padding-left: 1.5rem;
  padding-right: 0;
}

/* last row — remove bottom border */
.portfolio-item:nth-last-child(1),
.portfolio-item:nth-last-child(2) {
  border-bottom: none;
}

/* portfolio-more: contains a link */
.portfolio-more {
  cursor: pointer;
}

.portfolio-more a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-decoration: none;
  color: inherit;
}

.p-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color 0.2s;
}

.portfolio-item:hover .p-name {
  color: var(--accent);
}

.p-desc {
  font-size: 0.8rem;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  color: var(--subtle);
  line-height: 1.45;
}

.portfolio-more .p-name {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--subtle);
}

.portfolio-more:hover .p-name {
  color: var(--accent);
}

/* ─────────────────────────────────────
   ELSEWHERE
───────────────────────────────────── */

.elsewhere-list {
  display: flex;
  flex-direction: column;
  max-width: 580px;
}

.elsewhere-item {
  display: block;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}

.elsewhere-item:first-child {
  border-top: 1px solid var(--rule);
}

.elsewhere-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.e-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink);
  transition: color 0.2s;
}

.elsewhere-item:hover .e-title {
  color: var(--accent);
}

.e-tag {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

.e-desc {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.6;
}

/* ─────────────────────────────────────
   FOOTER
───────────────────────────────────── */

footer {
  border-top: 1px solid var(--rule);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 3.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--subtle);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--ink);
}

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

/* ─────────────────────────────────────
   ANIMATIONS
───────────────────────────────────── */

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────
   RESPONSIVE
───────────────────────────────────── */

@media (max-width: 760px) {
  #nav {
    padding: 1.25rem 1.5rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .hero {
    padding: 0 1.5rem 3.5rem;
    gap: 2rem;
  }

  main {
    padding: 0 1.5rem;
  }

  section {
    grid-template-columns: 1fr;
    row-gap: 2rem;
    padding: 3.5rem 0;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-item:nth-child(odd) {
    border-right: none;
  }

  .portfolio-item:nth-child(even) {
    padding-left: 0;
  }

  /* on mobile, only last item loses border */
  .portfolio-item:nth-last-child(2) {
    border-bottom: 1px solid var(--rule);
  }

  .portfolio-item:nth-last-child(1) {
    border-bottom: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 2rem 1.5rem 2.5rem;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 1.25rem;
  }
}
