/* ─────────────────────────────────────────
   TOKENS
───────────────────────────────────────── */
:root {
  --bg:        #f2f2f2;       /* neutral light grey */
  --fg:        #181818;       /* pure near-black */
  --muted:     #888888;       /* mid grey */
  --accent:    #c0392b;       /* understated red */
  --rule:      #dedede;       /* clean divider */
  --max:       860px;
  --pad:       clamp(1.5rem, 5vw, 4rem);

  --serif:     'Cormorant Garamond', Georgia, serif;
  --mono:      'DM Mono', 'Courier New', monospace;
}

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 18px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent); }

/* ─────────────────────────────────────────
   NAV IDENTITY
───────────────────────────────────────── */
.nav-identity {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.avatar-float {
  width: 0px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.6);
  transition: width 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
  flex-shrink: 0;
}

.avatar-float.visible {
  width: 42px;
  opacity: 1;
  transform: scale(1);
}

.avatar-float img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  object-position: center 5%;
  filter: grayscale(100%);
  display: block;
}

/* ─────────────────────────────────────────
   NAV
───────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.nav-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--fg);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul li a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
nav ul li a:hover { color: var(--fg); }

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4rem;
  padding: 6rem var(--pad) 4rem;
  max-width: var(--max);
  margin: 0 auto;
}

.hero-inner {
  animation: fadeUp 1s ease both;
}

.hero-photo {
  animation: fadeUp 1.2s ease both;
  display: flex;
  align-items: flex-end;
  height: 70vh;
  max-height: 520px;
  padding-top: 3.6rem;
}

.hero-photo img {
  height: 100%;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  object-position: top;
  filter: grayscale(100%);
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.hero-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  white-space: nowrap;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: italic;
  color: var(--muted);
}

.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 420px;
  line-height: 1.7;
  margin-top: 1.5rem;
  font-family: var(--serif);
}

.scroll-cue {
  display: inline-block;
  margin-top: 3rem;
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--muted);
  animation: bob 2s ease-in-out infinite;
}

/* ─────────────────────────────────────────
   SECTIONS
───────────────────────────────────────── */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 6rem var(--pad);
  border-top: 1px solid var(--rule);
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section.animate {
  opacity: 0;
  transform: translateY(24px);
}

.section.animate.visible {
  opacity: 1;
  transform: none;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3rem;
}

/* ─────────────────────────────────────────
   ABOUT
───────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-text p { margin-bottom: 1.1rem; font-size: 1.05rem; text-align: justify; hyphens: auto; }
.about-text .lead { font-size: 1.25rem; line-height: 1.55; margin-bottom: 1.5rem; }
.about-text strong { font-weight: 400; }

.about-meta {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding-top: 0.25rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
}
.meta-item:last-child { border-bottom: none; }

.meta-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-value {
  font-size: 1rem;
}

.meta-value a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.meta-value a:hover { border-color: var(--accent); }

/* ─────────────────────────────────────────
   PROJECTS
───────────────────────────────────────── */
.projects-list {
  display: flex;
  flex-direction: column;
}

.project-item {
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--rule);
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.project-item:first-child { border-top: 1px solid var(--rule); }
.project-item.animate { opacity: 0; transform: translateY(16px); }
.project-item.animate.visible { opacity: 1; transform: none; }

.project-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.project-year {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

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

.tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 100px;
  color: var(--muted);
}

.project-title {
  font-size: 1.45rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}
.project-title a { transition: color 0.2s; }
.project-title a:hover { color: var(--accent); }

.project-desc {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.65;
  text-align: justify;
  hyphens: auto;
}

/* ─────────────────────────────────────────
   EXPERIENCE
───────────────────────────────────────── */
.experience-list {
  display: flex;
  flex-direction: column;
}

.exp-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2.5rem;
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--rule);
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.exp-item:first-child { border-top: 1px solid var(--rule); }
.exp-item.animate { opacity: 0; transform: translateY(16px); }
.exp-item.animate.visible { opacity: 1; transform: none; }

.exp-period {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-top: 0.3rem;
}

.exp-title {
  font-size: 1.35rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}

.exp-org {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.9rem;
  text-transform: uppercase;
}

.exp-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 1rem;
  text-align: justify;
  hyphens: auto;
}

.exp-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────
   SKILLS
───────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.skill-block {
  padding: 1.8rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.skill-heading {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
  font-weight: 400;
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.skill-list li {
  font-size: 0.97rem;
  color: var(--fg);
  padding-left: 0.9rem;
  position: relative;
}

.skill-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

/* ─────────────────────────────────────────
   CONTACT
───────────────────────────────────────── */
.contact-intro {
  font-size: 1.2rem;
  max-width: 520px;
  margin-bottom: 3rem;
  line-height: 1.65;
  text-align: justify;
  hyphens: auto;
}

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

.contact-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
  transition: background 0.15s;
  gap: 1rem;
}
.contact-link:first-child { border-top: 1px solid var(--rule); }
.contact-link:hover .contact-value { color: var(--accent); }

.contact-type {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 80px;
}

.contact-value {
  font-size: 1.05rem;
  transition: color 0.2s;
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem var(--pad);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ─────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 640px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .hero-photo {
    height: 40vh;
    justify-content: center;
    order: -1;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero h1 { font-size: clamp(2.2rem, 10vw, 3.5rem); }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .contact-link { flex-direction: column; gap: 0.2rem; }

  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}
