/* =====================================================
   Umar Saeed — Portfolio Stylesheet v4
   Monochromatic system — calm, editorial, premium
   Display: Fraunces   Body: Inter
   ===================================================== */

:root {
  /* ---- single monochromatic system ---- */
  --bg:        #FFFFFF;   /* page background — the only background most of the page ever uses */
  --card:      #F4F4F4;   /* the one supporting surface, for cards/chips only */
  --ink:       #1F1F1F;   /* primary text */
  --muted:     #6E6E6E;   /* secondary text */
  --accent:    #8A7356;   /* the one accent — used sparingly */

  --accent-soft:   rgba(138,115,86,0.10);
  --accent-line:   rgba(138,115,86,0.32);
  --hairline:      rgba(31,31,31,0.09);
  --hairline-soft: rgba(31,31,31,0.05);
  --on-accent:     #FFFFFF;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* ---- strict type scale ---- */
  --fs-hero:    clamp(2.75rem, 7.6vw, 6.6rem);   /* ~44px desktop-min → 105px desktop-max */
  --fs-section: clamp(2.3rem, 4.6vw, 4.3rem);    /* ~37px → ~69px */
  --fs-project: clamp(1.65rem, 2.3vw, 2.2rem);   /* ~26px → ~35px */
  --fs-subtitle: clamp(1.2rem, 1.3vw, 1.45rem);  /* ~19px → ~23px */
  --fs-body:    1.125rem;                         /* 18px, fixed */
  --fs-meta:    0.875rem;                         /* 14px, fixed */

  --container: 1180px;
  --section-py: 3.75rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.4s;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; scroll-padding-top: 84px; }
body { font-family: var(--font-body); background: var(--bg); color: var(--ink); line-height: 1.7; overflow-x: hidden; font-size: var(--fs-body); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ===== STRICT HEADING HIERARCHY — each level visually distinct, never competing ===== */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.015em; font-weight: 600; color: var(--ink); }

.hero-title    { font-size: var(--fs-hero); font-weight: 600; letter-spacing: -0.025em; line-height: 0.98; }
.section-title { font-size: var(--fs-section); font-weight: 600; line-height: 1.05; margin-bottom: 4.25rem; }
.project-title { font-size: var(--fs-project); font-weight: 600; line-height: 1.15; }
.subtitle      { font-size: var(--fs-subtitle); font-weight: 400; color: var(--muted); line-height: 1.5; font-family: var(--font-body); }
.meta-label    { font-size: var(--fs-meta); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-family: var(--font-body); }

p { font-size: var(--fs-body); }
em { font-style: italic; font-weight: 500; color: var(--accent); }
strong { font-weight: 600; color: var(--ink); }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.75rem; }

/* ===== single-surface page — no color-block sections, separation via space + hairlines ===== */
.section { padding: var(--section-py) 0; position: relative; }
.section + .section { border-top: 1px solid var(--hairline-soft); }

.section-label {
  font-size: var(--fs-meta);
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.section-heading { margin-bottom: 4.5rem; max-width: 720px; }
.section-heading .subtitle { margin-top: 1.1rem; }

/* ===== SCROLL PROGRESS RAIL ===== */
.progress-rail { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; }
.progress-fill { height: 100%; width: 0%; background: var(--accent); transition: width 0.1s linear; }

/* ===== CURSOR DOT ===== */
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 7px; height: 7px;
  background: var(--accent); border-radius: 50%; pointer-events: none; z-index: 999;
  transform: translate(-50%, -50%); opacity: 0;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.cursor-dot.active { opacity: 0.7; }
.cursor-dot.grow { transform: translate(-50%, -50%) scale(3.2); opacity: 0.22; }
@media (max-width: 900px), (hover: none) { .cursor-dot { display: none; } }

/* ===== SCROLL REVEAL ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.85s var(--ease), transform 0.85s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

.mask-reveal { opacity: 0; transform: translateY(100%); animation: maskUp 0.9s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes maskUp { to { opacity: 1; transform: translateY(0); } }
.hero-line { display: block; overflow: hidden; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.85rem; font-family: var(--font-body); font-weight: 600; font-size: 0.94rem;
  cursor: pointer; border: 1.5px solid transparent; border-radius: 3px;
  transition: all var(--dur) var(--ease);
}
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-full { width: 100%; justify-content: center; }

/* ===== TAGS ===== */
.tag {
  display: inline-block; padding: 0.32rem 0.8rem; font-family: var(--font-body);
  font-size: 0.74rem; font-weight: 500; border-radius: 3px; white-space: nowrap;
  color: var(--muted); background: var(--card); border: 1px solid var(--hairline);
  transition: all var(--dur) var(--ease);
}
.tag:hover { border-color: var(--accent-line); color: var(--accent); }
.tag-primary { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); font-weight: 600; }

/* ===== NAVBAR — single consistent style, elevates on scroll, no color flip ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.navbar.scrolled { border-bottom-color: var(--hairline); box-shadow: 0 1px 0 0 var(--hairline-soft); }

.nav-inner { max-width: var(--container); margin: 0 auto; padding: 0 1.75rem; height: 68px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--ink); letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 0.2rem; list-style: none; }
.nav-link { font-family: var(--font-body); font-size: 0.88rem; font-weight: 500; color: var(--muted); padding: 0.4rem 0.85rem; border-radius: 3px; transition: color var(--dur) var(--ease), background var(--dur) var(--ease); }
.nav-link:hover, .nav-link.active { color: var(--ink); background: var(--hairline-soft); }
.nav-link.nav-cta { color: var(--accent); border: 1.3px solid var(--accent-line); padding: 0.38rem 0.95rem; }
.nav-link.nav-cta:hover { background: var(--accent-soft); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 0.4rem; border-radius: 3px; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); border-radius: 1px; transition: all var(--dur) var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--hairline);
    padding: 1rem 1.75rem; gap: 0.2rem;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.7rem 0.85rem; }
}

/* ===== HERO — calm, no color block, restrained decoration ===== */
.hero { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; position: relative; padding: 8.5rem 0 2.5rem; }

.hero-rule { width: 46px; height: 2px; background: var(--accent); margin-bottom: 2rem; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.6rem; font-size: var(--fs-meta); font-weight: 600;
  color: var(--accent); border: 1px solid var(--accent-line); background: var(--accent-soft);
  padding: 0.4rem 1rem; border-radius: 20px; margin-bottom: 2.5rem; width: fit-content;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.badge-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse 2.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }

.hero-title { margin-bottom: 1.75rem; }
.hero-role {
  font-size: var(--fs-subtitle); font-weight: 400; color: var(--muted); line-height: 1.3;
  font-family: var(--font-display); font-style: italic; letter-spacing: normal; margin-bottom: 0;
}
.hero-role:last-of-type { margin-bottom: 2.25rem; }
.hero-role strong { color: var(--ink); font-weight: 600; font-style: normal; }
.hero-role-em { color: var(--accent); font-weight: 600; font-style: normal; }

.hero-desc { max-width: 620px; font-size: var(--fs-body); color: var(--muted); margin-bottom: 2.75rem; line-height: 1.8; }
.hero-desc strong { color: var(--ink); }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 4rem; }

.hero-stats { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; margin-bottom: 3.25rem; padding-top: 2.75rem; border-top: 1px solid var(--hairline); }
.stat { text-align: left; }
.stat-num { display: block; font-family: var(--font-display); font-size: 2.1rem; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; line-height: 1; }
.stat-label { font-size: 0.72rem; color: var(--muted); margin-top: 0.4rem; display: block; text-transform: uppercase; letter-spacing: 0.07em; }
.stat-divider { width: 1px; height: 30px; background: var(--hairline); flex-shrink: 0; }

.hero-social { display: flex; gap: 0.7rem; }
.social-link { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 3px; border: 1px solid var(--hairline); color: var(--muted); transition: all var(--dur) var(--ease); }
.social-link:hover { color: var(--bg); border-color: var(--ink); background: var(--ink); transform: translateY(-2px); }

.hero-scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-size: 0.66rem; color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7;
}
.scroll-line { width: 1px; height: 36px; background: linear-gradient(to bottom, var(--accent), transparent); animation: scrollDown 1.8s ease-in-out infinite; }
@keyframes scrollDown {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 480px) { .hero-stats { gap: 1.25rem; } .stat-divider { display: none; } }

/* ===== HERO TWO-COLUMN LAYOUT ===== */
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center; }
.hero-content { min-width: 0; }
.hero-visual { min-width: 0; }
.hero-visual.mask-reveal { transform: translateY(28px); }

/* ===== TERMINAL CARD ===== */
.terminal-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: 10px;
  overflow: hidden; box-shadow: 0 24px 60px -20px rgba(31,31,31,0.18);
  transform: rotate(0.4deg);
}
.terminal-bar {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.85rem 1.1rem; background: var(--bg); border-bottom: 1px solid var(--hairline);
}
.terminal-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hairline); }
.terminal-title {
  margin-left: 0.5rem; font-size: 0.74rem; color: var(--muted);
  font-family: var(--font-body); letter-spacing: 0.02em;
}
.terminal-body {
  padding: 1.4rem 1.5rem 1.6rem; font-family: 'SF Mono', 'Fira Code', ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  font-size: 0.82rem; line-height: 1.95;
}
.t-line { color: var(--ink); white-space: pre-wrap; opacity: 0; transform: translateY(4px); animation: tLineIn 0.5s ease forwards; }
.t-line:nth-child(1)  { animation-delay: 0.7s; }
.t-line:nth-child(2)  { animation-delay: 0.95s; }
.t-line:nth-child(3)  { animation-delay: 1.1s; }
.t-line:nth-child(4)  { animation-delay: 1.25s; }
.t-line:nth-child(5)  { animation-delay: 1.45s; }
.t-line:nth-child(6)  { animation-delay: 1.7s; }
.t-line:nth-child(7)  { animation-delay: 1.95s; }
.t-line:nth-child(8)  { animation-delay: 2.15s; }
.t-line:nth-child(9)  { animation-delay: 2.4s; }
.t-line:nth-child(10) { animation-delay: 2.65s; }
@keyframes tLineIn { to { opacity: 1; transform: none; } }

.t-prompt { color: var(--accent); font-weight: 600; }
.t-pass { color: var(--muted); }
.t-pass::before { content: ''; }
.t-ok { color: var(--accent); font-weight: 500; }
.t-cmd { margin-top: 0.65rem; }
.t-cursor { color: var(--accent); margin-top: 0.65rem; }
.t-blink { animation: tBlink 1s step-end infinite; }
@keyframes tBlink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { max-width: 480px; }
  .terminal-card { transform: none; }
}
@media (max-width: 480px) {
  .terminal-body { font-size: 0.74rem; padding: 1.1rem 1.1rem 1.3rem; }
}

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 5rem; align-items: start; }
.about-text p { margin-bottom: 1.4rem; line-height: 1.85; color: var(--ink); }
.about-meta { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 0.7rem; }
.meta-item { display: flex; align-items: center; gap: 0.75rem; font-size: 0.92rem; color: var(--muted); }
.meta-icon { font-size: 1rem; }

.about-pullquote { margin: 3rem 0 0 0; padding: 2rem 0 0; border-top: 1px solid var(--hairline); max-width: 480px; }
.about-pullquote p { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.4rem; color: var(--ink); line-height: 1.45; }
.about-pullquote span { display: block; margin-top: 1rem; font-size: var(--fs-meta); color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; font-family: var(--font-body); }

.about-highlights { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 0.4rem; }
.highlight-card { display: flex; gap: 1rem; padding: 1.6rem; background: var(--card); border-radius: 4px; transition: transform var(--dur) var(--ease); }
.highlight-card:hover { transform: translateX(6px); }
.highlight-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 0.1rem; }
.highlight-card strong { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 0.35rem; font-weight: 600; }
.highlight-card p { font-size: 0.88rem; color: var(--muted); margin: 0; line-height: 1.65; }

@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 3rem; } }

/* ===== SKILLS ===== */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.skill-card:first-child { grid-column: span 2; }

.skill-card { background: var(--card); border-radius: 6px; padding: 2rem; position: relative; overflow: hidden; transition: box-shadow var(--dur) var(--ease); }
.skill-card::before {
  content: attr(data-letter); position: absolute; right: 0.8rem; bottom: -0.7rem;
  font-family: var(--font-display); font-size: 5.5rem; font-weight: 600; color: rgba(31,31,31,0.025); line-height: 1; pointer-events: none;
}
.skill-card:hover, .skill-card:focus { box-shadow: 0 2px 24px rgba(31,31,31,0.06); outline: none; }

.skill-card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.3rem; position: relative; z-index: 1; }
.skill-icon { font-size: 1.25rem; }
.skill-card h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; position: relative; z-index: 1; }
.skill-tags .tag { background: var(--bg); }

@media (max-width: 1024px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } .skill-card:first-child { grid-column: span 2; } }
@media (max-width: 600px) { .skills-grid { grid-template-columns: 1fr; } .skill-card:first-child { grid-column: span 1; } }

/* ===== EXPERIENCE / TIMELINE (scroll-linked thread, restrained) ===== */
.timeline { position: relative; padding-left: 2.75rem; }
.timeline::before { content: ''; position: absolute; left: 0.45rem; top: 0; bottom: 0; width: 1.5px; background: var(--hairline); }
.timeline-thread { position: absolute; left: 0.45rem; top: 0; width: 1.5px; height: 0%; background: var(--accent); transition: height 0.15s linear; }

.timeline-item { position: relative; margin-bottom: 4rem; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute; left: -2.75rem; top: 0.4rem; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--hairline);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); z-index: 1;
}
.timeline-item.in-view .timeline-marker { background: var(--accent); border-color: var(--accent); }

.timeline-content { background: var(--card); border-radius: 6px; padding: 2.2rem; transition: box-shadow var(--dur) var(--ease); }
.timeline-item:hover .timeline-content { box-shadow: 0 2px 24px rgba(31,31,31,0.06); }

.timeline-header { margin-bottom: 1.6rem; }
.timeline-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.85rem; flex-wrap: wrap; }
.timeline-date { font-size: var(--fs-meta); font-weight: 600; color: var(--ink); background: var(--bg); padding: 0.22rem 0.7rem; border-radius: 3px; }
.timeline-location { font-size: 0.84rem; color: var(--muted); }
.timeline-company { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; margin-bottom: 0.25rem; }
.timeline-role { font-size: 1rem; color: var(--ink); font-weight: 500; font-family: var(--font-body); }
.timeline-subtitle { font-size: 0.84rem; color: var(--muted); margin-top: 0.2rem; }

.timeline-bullets { list-style: none; margin-bottom: 1.6rem; }
.timeline-bullets li { position: relative; padding-left: 1.3rem; margin-bottom: 0.8rem; font-size: 0.97rem; color: var(--ink); line-height: 1.75; }
.timeline-bullets li::before { content: '—'; position: absolute; left: 0; color: var(--accent); font-size: 0.85rem; }

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

@media (max-width: 480px) {
  .timeline { padding-left: 1.75rem; }
  .timeline-marker { left: -1.75rem; }
  .timeline-thread { left: 0.45rem; }
  .timeline-content { padding: 1.5rem; }
}

/* =====================================================
   PROJECT MEDIA COMPONENT — reusable, image-ready
   Accepts: logo chip + screenshot frame (single or gallery)
   Falls back to a tasteful animated skeleton when no
   screenshot is supplied yet — never a blank box.
   ===================================================== */

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

.project { display: block; }

.project-media { position: relative; margin-bottom: 2.25rem; }

.media-frame {
  position: relative; aspect-ratio: 16 / 9.5; border-radius: 10px; overflow: hidden;
  background: var(--card);
  border: 1px solid var(--hairline);
  box-shadow: 0 2px 28px rgba(31,31,31,0.07);
  cursor: default;
}
.media-frame.has-image { cursor: zoom-in; }

.media-image {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.6s var(--ease);
}
.media-frame.has-image:hover .media-image { transform: scale(1.035); }

/* tasteful skeleton — used until a real screenshot is supplied */
.media-skeleton { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem; }
.skeleton-shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--card) 38%, rgba(255,255,255,0.65) 50%, var(--card) 62%);
  background-size: 200% 100%;
  animation: shimmer 3.2s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 140% 0; } 100% { background-position: -40% 0; } }
.media-skeleton-icon { position: relative; z-index: 1; font-size: 1.8rem; opacity: 0.4; }
.media-skeleton-label {
  position: relative; z-index: 1; font-size: var(--fs-meta); color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}

.media-logo-chip {
  position: absolute; left: 1.75rem; bottom: -1.75rem;
  width: 64px; height: 64px; border-radius: 12px;
  background: #FFFFFF; border: 1px solid var(--hairline);
  box-shadow: 0 6px 20px rgba(31,31,31,0.08);
  display: flex; align-items: center; justify-content: center; padding: 0.85rem;
  z-index: 2;
}
.media-logo-chip img { width: 100%; height: 100%; object-fit: contain; }
.media-logo-chip.is-monogram { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; color: var(--accent); }

.project-body { padding-left: 1.75rem; }
.project-eyebrow { display: block; margin-bottom: 0.9rem; }
.project-title { margin-bottom: 0.4rem; }
.project-company { font-size: 0.95rem; color: var(--muted); margin-bottom: 1.75rem; }

.project-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; margin-bottom: 1.75rem; }
.detail-label { display: block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.5rem; }
.detail-block p { font-size: 0.92rem; color: var(--muted); line-height: 1.7; }

.project-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.project-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.project-link span { transition: transform var(--dur) var(--ease); display: inline-block; }
.project-link:hover span { transform: translate(2px, -2px); }
.project-link:hover { color: var(--accent); }

@media (max-width: 700px) {
  .project-body { padding-left: 0; }
  .project-detail-grid { grid-template-columns: 1fr; gap: 1.1rem; }
  .media-logo-chip { width: 54px; height: 54px; left: 1.25rem; bottom: -1.25rem; padding: 0.7rem; }
  .project-body { margin-top: 1.5rem; }
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(31,31,31,0.92); z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 4rem 2rem;
  opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease);
}
.lightbox-overlay.open { opacity: 1; pointer-events: auto; }
.lightbox-img { max-width: min(1100px, 100%); max-height: 86vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,0.4); transform: scale(0.96); transition: transform 0.35s var(--ease); }
.lightbox-overlay.open .lightbox-img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 1.75rem; right: 1.75rem; width: 42px; height: 42px;
  border-radius: 50%; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
  color: #FFFFFF; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--dur) var(--ease);
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* ===== EDUCATION ===== */
.education-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.edu-card { display: flex; align-items: flex-start; gap: 1.3rem; background: var(--card); border-radius: 6px; padding: 2.1rem; transition: box-shadow var(--dur) var(--ease); }
.edu-card:hover { box-shadow: 0 2px 24px rgba(31,31,31,0.06); }
.edu-icon { font-size: 1.8rem; margin-top: 0.1rem; }
.edu-degree { font-size: var(--fs-meta); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.35rem; }
.edu-field { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; margin-bottom: 0.4rem; }
.edu-institution { font-size: 0.92rem; color: var(--ink); margin-bottom: 0.9rem; }
.edu-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.edu-date { font-size: 0.82rem; color: var(--muted); }
.edu-gpa { font-size: 0.78rem; color: var(--accent); font-weight: 600; background: var(--accent-soft); padding: 0.18rem 0.6rem; border-radius: 3px; }

@media (max-width: 700px) { .education-grid { grid-template-columns: 1fr; } }

/* ===== CONTACT ===== */
.contact-desc { max-width: 560px; color: var(--muted); margin-bottom: 4rem; line-height: 1.8; }
.contact-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 5rem; align-items: start; }

.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-item { display: flex; align-items: center; gap: 1.1rem; padding: 1.3rem 1.5rem; background: var(--card); border-radius: 6px; transition: transform var(--dur) var(--ease); }
.contact-item:hover { transform: translateX(6px); }
.contact-item-icon { font-size: 1.3rem; flex-shrink: 0; }
.contact-item-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.25rem; }
.contact-item-value { font-size: 0.94rem; color: var(--ink); font-weight: 500; }

.contact-form { display: flex; flex-direction: column; gap: 1.6rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-label { font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; color: var(--ink); }
.form-input {
  background: transparent; border: none; border-bottom: 1.5px solid var(--hairline); border-radius: 0;
  padding: 0.7rem 0.1rem; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  transition: border-color var(--dur) var(--ease); width: 100%;
}
.form-input::placeholder { color: var(--muted); }
.form-input:focus { outline: none; border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 0.85rem; text-align: center; min-height: 1.2em; color: var(--muted); }
.form-note.success { color: var(--accent); }
.form-note.error { color: #B0594A; }

@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; gap: 3rem; } }

/* ===== FOOTER ===== */
.footer { padding: 3.5rem 0; border-top: 1px solid var(--hairline); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; text-align: center; }
.footer-brand { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.footer-tagline { font-size: 0.87rem; color: var(--muted); }
.footer-copy { font-size: 0.78rem; color: var(--muted); margin-top: 0.3rem; opacity: 0.7; }

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink); border: none; color: var(--bg); font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(12px); transition: all var(--dur) var(--ease); z-index: 90;
}
.back-to-top.visible { opacity: 1; transform: none; }
.back-to-top:hover { background: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  :root { --section-py: 2.5rem; }
  .hero-actions { flex-direction: column; }
  .section-heading { margin-bottom: 3rem; }
  .contact-item { padding: 1.1rem; }
}
