/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg: #080b12;
  --bg-elevated: #0e131d;
  --bg-card: #111827;
  --bg-card-hover: #151e2e;
  --surface-border: rgba(148, 163, 184, 0.12);
  --surface-border-strong: rgba(148, 163, 184, 0.22);

  --text: #e8edf5;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent: #38bdf8;
  --accent-deep: #0ea5e9;
  --violet: #818cf8;
  --violet-deep: #6366f1;
  --green: #34d399;

  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--violet) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(129, 140, 248, 0.14));

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', monospace;

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 6rem;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 16px 48px rgba(0, 0, 0, 0.5);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.45s;

  --container: 1160px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

::selection { background: rgba(56, 189, 248, 0.3); color: #fff; }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  background: var(--accent); color: #04101c; padding: 0.6rem 1rem;
  border-radius: var(--radius-sm); font-weight: 600; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section { padding-block: var(--space-2xl); position: relative; }
.section-title {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.page-intro { padding-top: calc(var(--header-h) + var(--space-2xl)); padding-bottom: var(--space-xl); }
.page-title { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.08; }
.page-lede { color: var(--text-muted); max-width: 58ch; margin-top: var(--space-md); font-size: 1.08rem; }

.text-link {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.25s var(--ease-out);
}
.text-link:hover { gap: 0.6rem; }

/* ============================================================
   HEADER & NAV
   ============================================================ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: rgba(8, 11, 18, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s;
}
.site-header.scrolled {
  background: rgba(8, 11, 18, 0.88);
  border-bottom-color: var(--surface-border);
}

.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  width: min(100% - 2.5rem, var(--container));
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.wordmark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.wordmark-dot { color: var(--accent); }

.desktop-nav { display: flex; gap: var(--space-lg); margin-left: auto; }
.nav-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
  padding-block: 0.3rem;
  transition: color 0.25s;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; border-radius: 2px; background: var(--gradient-accent);
}

.header-cta { margin-left: var(--space-sm); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

.hamburger { display: none; margin-left: auto; width: 40px; height: 40px; position: relative; }
.hamburger span {
  display: block; position: absolute; left: 8px; right: 8px; height: 2px;
  background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.hamburger span:nth-child(1) { top: 13px; }
.hamburger span:nth-child(2) { top: 19px; }
.hamburger span:nth-child(3) { top: 25px; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99;
  background: rgba(8, 11, 18, 0.97);
  backdrop-filter: blur(20px);
  padding: var(--space-lg) 1.25rem var(--space-xl);
  display: flex; flex-direction: column; gap: var(--space-sm);
  border-bottom: 1px solid var(--surface-border);
  animation: menuIn 0.3s var(--ease-out);
}
.mobile-menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } }
.mobile-link { padding: 0.8rem 0.5rem; font-size: 1.05rem; color: var(--text-muted); border-bottom: 1px solid var(--surface-border); }
.mobile-link.active { color: var(--accent); }
.mobile-cta { margin-top: var(--space-sm); text-align: center; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.78rem 1.4rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.92rem; line-height: 1;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background 0.25s, border-color 0.25s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-primary {
  background: var(--gradient-accent); color: #04101c;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.22);
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(56, 189, 248, 0.35); transform: translateY(-2px); }
.btn-arrow { transition: transform 0.25s var(--ease-out); }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.btn-ghost {
  border-color: var(--surface-border-strong); color: var(--text);
  background: rgba(148, 163, 184, 0.04);
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(56, 189, 248, 0.08); transform: translateY(-2px); }

.btn-whatsapp { background: #1f8f5f; color: #eafff4; }
.btn-whatsapp:hover { background: #23a36d; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(31, 143, 95, 0.3); }

.btn[aria-disabled="true"],
.btn.disabled {
  opacity: 0.52;
  cursor: not-allowed;
  pointer-events: none;
  border-style: dashed;
}

.icon-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--surface-border); color: var(--text-muted);
  transition: color 0.25s, border-color 0.25s, transform 0.25s;
}
.icon-link:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.copy-toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 999;
  background: var(--bg-elevated); color: var(--accent);
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem; font-family: var(--font-mono); font-size: 0.85rem;
  box-shadow: var(--shadow-lift); opacity: 0;
  transform: translateY(12px); pointer-events: none;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.copy-toast.show { opacity: 1; transform: translateY(0); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: var(--space-2xl);
  overflow: hidden;
}
#bgCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-ambient {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 72% 30%, rgba(99, 102, 241, 0.12), transparent 70%),
    radial-gradient(ellipse 50% 45% at 25% 65%, rgba(56, 189, 248, 0.08), transparent 70%);
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-xl); align-items: center;
}

.hero-title {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  font-weight: 700; letter-spacing: -0.04em; line-height: 1.06;
  max-width: 18ch; margin-bottom: var(--space-md);
}
.hero-lede { color: var(--text-muted); max-width: 54ch; font-size: 1.05rem; margin-bottom: var(--space-xl); }

.hero-actions { display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; }

/* Portrait */
.hero-visual { display: flex; justify-content: center; }
.portrait-frame {
  position: relative; width: min(340px, 78vw); aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border-strong);
  padding: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(56, 189, 248, 0.08) inset;
}
.portrait-img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 12%;
  border-radius: calc(var(--radius-lg) - 8px);
  position: relative; z-index: 2;
  filter: saturate(1.02) contrast(1.02);
}
.portrait-img--about {
  object-position: 38% 18%;
}
.portrait-glow {
  position: absolute; inset: -18%; z-index: 1;
  background: radial-gradient(circle at 65% 25%, rgba(56, 189, 248, 0.22), transparent 55%),
              radial-gradient(circle at 30% 75%, rgba(129, 140, 248, 0.18), transparent 55%);
  filter: blur(28px); pointer-events: none;
}
.portrait-orbit {
  position: absolute; inset: -6%; z-index: 0; border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.16);
  animation: orbit 28s linear infinite;
}
.orbit-2 { inset: -14%; border-color: rgba(129, 140, 248, 0.12); animation-duration: 40s; animation-direction: reverse; }
@keyframes orbit { to { transform: rotate(360deg); } }

.img-fallback-text {
  display: none; position: absolute; inset: 0; z-index: 1;
  align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 3rem; color: var(--text-dim);
  letter-spacing: 0.1em;
}
.portrait-frame.img-fallback .img-fallback-text { display: flex; }

.tech-label {
  position: absolute; z-index: 3;
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(8, 11, 18, 0.78);
  border: 1px solid var(--surface-border);
  padding: 0.3rem 0.55rem; border-radius: 6px;
  backdrop-filter: blur(6px); white-space: nowrap;
}
.label-1 { top: 8%; left: -18%; }
.label-2 { bottom: 16%; right: -14%; }
.label-3 { bottom: 4%; left: 6%; }

/* ============================================================
   QUICK STRIP
   ============================================================ */
.quick-strip { border-block: 1px solid var(--surface-border); background: rgba(14, 19, 29, 0.5); }
.strip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.strip-item {
  display: flex; gap: var(--space-md); padding: var(--space-lg) var(--space-md);
  border-right: 1px solid var(--surface-border);
}
.strip-item:last-child { border-right: none; }
.strip-index { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); padding-top: 0.2rem; }
.strip-item strong { display: block; font-size: 0.95rem; margin-bottom: 0.2rem; }
.strip-item p { color: var(--text-muted); font-size: 0.86rem; }

/* ============================================================
   PROJECT CARDS
   ============================================================ */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.project-grid--full { grid-template-columns: repeat(2, 1fr); }

.project-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius-md); overflow: hidden;
  transition: transform var(--duration) var(--ease-out), border-color var(--duration), box-shadow var(--duration);
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: var(--shadow-lift);
}
.project-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit; opacity: 0; transition: opacity var(--duration);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.18) inset;
}
.project-card:hover::after { opacity: 1; }

.project-media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--bg-elevated);
}
.project-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.project-card:hover .project-media img { transform: scale(1.045); }
.project-media-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.05), rgba(129, 140, 248, 0.05)),
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(148, 163, 184, 0.03) 10px, rgba(148, 163, 184, 0.03) 20px);
  color: var(--text-dim); font-family: var(--font-mono); font-size: 0.72rem;
  text-align: center; padding: 1rem;
}

.project-status {
  position: absolute; top: 0.75rem; left: 0.75rem; z-index: 2;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.28rem 0.55rem; border-radius: 4px;
  background: rgba(8, 11, 18, 0.88); border: 1px solid var(--surface-border);
  color: var(--text-muted); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.project-status[data-status="live"] { color: var(--green); border-color: rgba(52, 211, 153, 0.3); }
.project-status[data-status="prototype"] { color: var(--violet); border-color: rgba(129, 140, 248, 0.3); }

.project-body { padding: var(--space-md) var(--space-md) var(--space-lg); display: flex; flex-direction: column; flex: 1; }
.project-category { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.4rem; }
.project-title { font-size: 1.22rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 0.45rem; line-height: 1.3; }
.project-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: var(--space-md); flex: 1; }

.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: var(--space-md); }
.tag {
  font-family: var(--font-mono); font-size: 0.68rem; padding: 0.24rem 0.5rem;
  border-radius: 4px; background: rgba(148, 163, 184, 0.07);
  border: 1px solid var(--surface-border); color: var(--text-muted);
}

.project-actions { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.project-actions .btn { padding: 0.5rem 0.9rem; font-size: 0.8rem; }
.btn-outline {
  border-color: var(--surface-border-strong); color: var(--text-muted);
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent); color: var(--text); }
.card-arrow { margin-left: auto; font-size: 1.1rem; color: var(--text-dim); transition: transform 0.3s var(--ease-out), color 0.3s; }
.project-card:hover .card-arrow { transform: translateX(4px); color: var(--accent); }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }
.skill-group h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: var(--space-sm); font-weight: 600; }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.skills-explorer { display: grid; gap: var(--space-lg); }
.skill-block { padding: var(--space-md); border: 1px solid var(--surface-border); border-radius: var(--radius-md); background: var(--bg-card); }
.skill-block h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: var(--space-sm); }

/* ============================================================
   CONTACT CTA
   ============================================================ */
.contact-cta { border-top: 1px solid var(--surface-border); background: radial-gradient(ellipse 70% 80% at 50% 100%, rgba(99, 102, 241, 0.08), transparent 70%); }
.contact-inner { text-align: center; max-width: 720px; margin-inline: auto; }
.cta-title { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; margin-bottom: var(--space-md); }
.cta-lede { color: var(--text-muted); font-size: 1.06rem; margin-bottom: var(--space-lg); }
.contact-actions { display: flex; justify-content: center; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.contact-meta { display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-dim); }
.contact-meta a { color: var(--text-muted); }
.contact-meta a:hover { color: var(--accent); }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: var(--space-xl); align-items: center; }
.portrait-frame--about { width: 100%; max-width: 360px; margin-inline: auto; }
.about-copy p { color: var(--text-muted); margin-bottom: var(--space-md); max-width: 56ch; }
.about-copy .btn { margin-top: var(--space-sm); }

/* Timeline */
.timeline { position: relative; padding-left: var(--space-lg); }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--violet), transparent);
  opacity: 0.4;
}
.timeline-item { position: relative; padding-bottom: var(--space-xl); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute; left: calc(-1 * var(--space-lg) + 1px); top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}
.timeline-date { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.timeline-content h3 { font-size: 1.25rem; margin: 0.25rem 0 0.35rem; }
.timeline-org { color: var(--text-muted); font-size: 0.92rem; }
.timeline-detail { color: var(--text-dim); font-size: 0.84rem; margin-top: 0.2rem; }

/* Experience */
.experience-card {
  display: grid; grid-template-columns: 180px 1fr; gap: var(--space-lg);
  background: var(--bg-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg); padding: var(--space-lg); overflow: hidden;
}
.experience-aside { display: flex; align-items: center; justify-content: center; }
.exp-graphic { position: relative; width: 100%; aspect-ratio: 1; }
.exp-graphic span {
  position: absolute; border-radius: 50%; border: 1px solid rgba(56, 189, 248, 0.2);
}
.exp-graphic span:nth-child(1) { inset: 10%; }
.exp-graphic span:nth-child(2) { inset: 25%; border-color: rgba(129, 140, 248, 0.2); }
.exp-graphic span:nth-child(3) { inset: 40%; background: var(--gradient-soft); border-color: rgba(56, 189, 248, 0.3); }
.exp-role { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.experience-body h3 { font-size: 1.45rem; margin: 0.3rem 0; }
.exp-location { color: var(--text-dim); font-size: 0.85rem; margin-bottom: var(--space-md); }
.experience-body p { color: var(--text-muted); margin-bottom: var(--space-md); max-width: 62ch; }

/* Interests */
.interest-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.interest-list li {
  padding: var(--space-md); border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm); background: var(--bg-card);
  color: var(--text-muted); font-size: 0.92rem;
}

/* ============================================================
   PROJECTS PAGE
   ============================================================ */
.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: var(--space-xl); }
.filter-btn {
  padding: 0.5rem 1rem; border-radius: 999px;
  border: 1px solid var(--surface-border); color: var(--text-muted);
  font-size: 0.84rem; font-weight: 500; transition: all 0.25s;
}
.filter-btn:hover { border-color: var(--surface-border-strong); color: var(--text); }
.filter-btn.active { background: var(--gradient-accent); color: #04101c; border-color: transparent; font-weight: 600; }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-xl) var(--space-md);
  background: var(--bg-card);
  border: 1px dashed var(--surface-border-strong);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
  font-size: 0.95rem;
}
.empty-state::before {
  content: '⚡';
  display: block;
  font-size: 1.8rem;
  margin-bottom: var(--space-xs);
  opacity: 0.7;
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 6, 10, 0.82); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; animation: fadeIn 0.25s var(--ease-out);
}
.modal-overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }

.modal {
  position: relative; width: min(680px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--bg-elevated); border: 1px solid var(--surface-border-strong);
  border-radius: var(--radius-lg); padding: var(--space-xl);
  box-shadow: var(--shadow-lift);
  animation: modalIn 0.35s var(--ease-out);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.modal-close {
  position: sticky; top: 0; float: right;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--surface-border); color: var(--text-muted);
  font-size: 1.25rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: color 0.2s, border-color 0.2s; z-index: 2;
}
.modal-close:hover { color: var(--text); border-color: var(--accent); }
.modal-body h2 { font-size: 1.6rem; margin-bottom: 0.3rem; letter-spacing: -0.02em; }
.modal-category { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; color: var(--accent); letter-spacing: 0.1em; margin-bottom: var(--space-md); }
.modal-section { margin-top: var(--space-md); }
.modal-section h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 0.35rem; }
.modal-section p { color: var(--text-muted); font-size: 0.92rem; }
.modal-actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--surface-border); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--surface-border); padding-block: var(--space-xl) var(--space-lg); margin-top: var(--space-2xl); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 0.6fr; gap: var(--space-lg); margin-bottom: var(--space-xl); }
.footer-name { font-weight: 600; font-size: 1rem; }
.footer-location { color: var(--text-dim); font-size: 0.82rem; margin-top: 0.2rem; }
.footer-grid nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-grid nav a { color: var(--text-muted); font-size: 0.88rem; }
.footer-grid nav a:hover { color: var(--accent); }
.footer-social { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-social a { color: var(--text-muted); font-size: 0.88rem; }
.footer-social a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap;
  padding-top: var(--space-md); border-top: 1px solid var(--surface-border);
  font-size: 0.78rem; color: var(--text-dim);
}

/* ============================================================
   SCROLL PROGRESS
   ============================================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 101; height: 2px; width: 0%;
  background: var(--gradient-accent);
  transition: width 0.1s linear;
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal-up.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 0.75fr; gap: var(--space-lg); }
  .project-grid, .project-grid--full { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  :root { --header-h: 64px; }
  .desktop-nav, .header-cta { display: none; }
  .hamburger { display: block; }

  .hero { min-height: auto; padding-top: calc(var(--header-h) + 2.5rem); padding-bottom: var(--space-xl); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .hero-copy { order: 2; }
  .hero-visual { order: 1; }
  .portrait-frame { width: min(280px, 70vw); }
  .tech-label { display: none; }
  .hero-title { max-width: none; }

  .strip-grid { grid-template-columns: 1fr; }
  .strip-item { border-right: none; border-bottom: 1px solid var(--surface-border); padding-block: var(--space-md); }
  .strip-item:last-child { border-bottom: none; }

  .about-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .experience-card { grid-template-columns: 1fr; }
  .experience-aside { max-width: 120px; margin-inline: auto; }
  .interest-list { grid-template-columns: 1fr; }

  .section-head { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .footer-social { flex-direction: row; }
  .modal { padding: var(--space-lg); }
}

@media (max-width: 480px) {
  .container { width: calc(100% - 1.75rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn, .hero-actions .icon-link { width: 100%; }
  .hero-actions .icon-link { width: 42px; align-self: flex-start; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-actions { flex-direction: column; }
  .contact-actions .btn { width: 100%; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-up { opacity: 1; transform: none; }
  .portrait-orbit { animation: none; }
  #bgCanvas { display: none; }
  .scroll-progress { display: none; }
}
