/* ==========================================================================
   Portfolio Design System — Glenn Wenand Arsemel Adorio
   Guided by Taste Skill: neutral-first palette, single teal accent,
   Host Grotesk + JetBrains Mono, strict spacing & hairline system.
   ========================================================================== */

:root {
  /* Light mode (default) — Teal on Paper */
  --bg: #f7f9f8;
  --surface: #ebf0ee;
  --surface-elevated: #ffffff;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #475569;
  --accent: #06525c;
  --accent-hover: #043e46;
  --accent-subtle: rgba(6, 82, 92, 0.08);
  --accent-ink: #ffffff;
  --border: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.24);
  --shadow-hover: 0 12px 28px rgba(15, 23, 42, 0.08);
  --hero-grid: rgba(15, 23, 42, 0.045);

  /* Typography */
  --font-sans: 'Host Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Spacing scale */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  /* Radii & Layout */
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --r-btn: 8px;
  --nav-h: 72px;
  --wrap-max: 1180px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-enter: cubic-bezier(0.22, 1, 0.36, 1);
}

html.dark-mode {
  --bg: #0c1116;
  --surface: #131b23;
  --surface-elevated: #18222c;
  --ink: #f1f5f9;
  --ink-secondary: #cbd5e1;
  --muted: #94a3b8;
  --accent: #2dd4bf;
  --accent-hover: #5eead4;
  --accent-subtle: rgba(45, 212, 191, 0.12);
  --accent-ink: #042f2e;
  --border: rgba(241, 245, 249, 0.12);
  --border-strong: rgba(241, 245, 249, 0.26);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.35);
  --hero-grid: rgba(241, 245, 249, 0.04);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.5rem);
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip Link */
.skip-link {
  position: fixed;
  top: -100px;
  left: var(--s-4);
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.65rem 1.1rem;
  border-radius: var(--r-btn);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.15s var(--ease);
}

.skip-link:focus {
  top: var(--s-3);
}

/* Container */
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding-inline: var(--s-6);
}

/* ==========================================================================
   Navigation & Scroll Progress Bar
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.scroll-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  pointer-events: none;
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-logo {
  height: 36px;
  width: 36px;
  object-fit: contain;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.5rem;
}

.nav-link {
  position: relative;
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.35rem 0;
  white-space: nowrap;
  transition: color 0.15s var(--ease);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
}

.nav-link.is-active::after,
.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), transform 0.1s var(--ease);
}

.icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.icon-btn:active {
  transform: scale(0.96);
}

.menu-toggle {
  display: none;
}

/* ==========================================================================
   Buttons & Links
   ========================================================================== */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 1.35rem;
  border-radius: var(--r-btn);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.12s var(--ease);
}

.btn--primary {
  background-color: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn--secondary {
  background-color: var(--surface-elevated);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn--secondary:hover {
  background-color: var(--surface);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px) scale(0.985);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s var(--ease);
}

.text-link:hover {
  border-bottom-color: var(--accent);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + var(--s-8));
  padding-bottom: var(--s-8);
  border-bottom: 1px solid var(--border);
  background-image:
    linear-gradient(to right, var(--hero-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hero-grid) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: var(--s-7);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: var(--s-5);
}

.hero-title {
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: var(--s-4);
}

.hero-role {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 500;
  color: var(--ink-secondary);
  margin-bottom: var(--s-4);
}

.hero-intro {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 58ch;
  margin-bottom: var(--s-5);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-6);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: var(--s-6);
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-meta-item i {
  color: var(--accent);
}

.hero-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: var(--s-5);
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-secondary);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}

.social-pill:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Profile Card */
.hero-profile {
  display: flex;
  justify-content: center;
}

.profile-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.profile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}

.profile-img--hover {
  opacity: 0;
}

.profile-frame:hover .profile-img--main,
.profile-frame:focus-within .profile-img--main {
  opacity: 0;
  transform: scale(1.02);
}

.profile-frame:hover .profile-img--hover,
.profile-frame:focus-within .profile-img--hover {
  opacity: 1;
  transform: scale(1.02);
}

.profile-caption {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-secondary);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  margin-right: 0.4rem;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding-block: var(--s-9);
  border-bottom: 1px solid var(--border);
}

.section--alt {
  background-color: var(--surface);
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: var(--s-7);
  max-width: 66ch;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}

.section-lead {
  font-size: 1.05rem;
  color: var(--muted);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: var(--s-6);
  align-items: start;
}

.about-prose {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.about-prose p {
  color: var(--ink-secondary);
  font-size: 1.025rem;
  max-width: 62ch;
}

.about-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}

.fact-item {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fact-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.fact-value {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink);
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
}

.skill-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.skill-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}

.skill-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skill-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--accent-subtle);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.skill-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 0.32rem 0.65rem;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

/* ==========================================================================
   Featured Engineering Project
   ========================================================================== */
.featured-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  margin-bottom: var(--s-7);
}

.featured-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s-4);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-6);
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: var(--s-3);
}

.featured-title {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.featured-summary {
  color: var(--muted);
  max-width: 64ch;
  font-size: 1.02rem;
}

.featured-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--s-6);
  align-items: start;
  margin-bottom: var(--s-6);
}

.video-wrapper {
  background: #090d12;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.demo-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-caption {
  padding: 0.65rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.featured-details {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.detail-block h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.detail-block p {
  font-size: 0.95rem;
  color: var(--muted);
}

.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.detail-list li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.95rem;
  color: var(--ink-secondary);
}

.detail-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Gallery */
.gallery-section {
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--s-4);
}

.gallery-header h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.gallery-hint {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
}

.gallery-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.gallery-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.gallery-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.gallery-item:hover .gallery-thumb img {
  transform: scale(1.03);
}

.gallery-caption {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gallery-caption i {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ==========================================================================
   Software & Web Projects Grid
   ========================================================================== */
.projects-subheading {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--s-5);
  color: var(--ink);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
}

.project-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-4);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--s-3);
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: var(--s-4);
}

.project-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: var(--s-4);
}

.project-features li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.project-features li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.project-footer {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* ==========================================================================
   Experience Timeline
   ========================================================================== */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  padding-left: var(--s-6);
}

.timeline-rail {
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 7px;
  width: 2px;
  background: var(--accent);
  transform-origin: top center;
}

.timeline-item {
  position: relative;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.timeline-item--current {
  border-color: var(--accent);
}

.timeline-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}

.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--s-6) + 1px);
  top: 1.75rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}

.timeline-item--current .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-subtle);
}

.exp-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  margin-bottom: var(--s-3);
}

.exp-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.25rem;
}

.exp-role {
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--ink);
}

.exp-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--border);
}

.exp-badge--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.exp-company {
  font-weight: 500;
  color: var(--accent);
  font-size: 0.98rem;
}

.exp-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}

.exp-duration {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-secondary);
}

.exp-location {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.exp-summary {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: var(--s-4);
  max-width: 68ch;
}

.exp-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1.5rem;
}

.exp-list li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.95rem;
  color: var(--ink-secondary);
}

.exp-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ==========================================================================
   Education, Awards & Certifications
   ========================================================================== */
.two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5);
}

.info-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-card-year {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
}

.info-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.info-card p {
  font-size: 0.95rem;
  color: var(--muted);
}

.awards-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--s-5);
  align-items: start;
}

.award-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: flex;
  gap: var(--s-5);
  align-items: flex-start;
}

.award-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--accent-subtle);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.award-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.award-card p {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  margin-bottom: 0.35rem;
}

.award-event {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
}

.cert-stack {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.cert-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.cert-card i {
  color: var(--accent);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.cert-title {
  font-weight: 500;
  font-size: 0.96rem;
  color: var(--ink);
}

.cert-issuer {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ==========================================================================
   Contact & Footer
   ========================================================================== */
.contact-panel {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-7);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--s-6);
  align-items: center;
}

.contact-panel h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.contact-panel p {
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: var(--s-5);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink-secondary);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.contact-row:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.contact-row i {
  color: var(--accent);
  width: 18px;
  text-align: center;
}

.site-footer {
  padding-block: var(--s-6);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: var(--s-5);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: var(--r-btn);
  background: var(--surface-elevated);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.15s var(--ease);
  z-index: 90;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 17, 22, 0.92);
  padding: var(--s-6);
  align-items: center;
  justify-content: center;
}

.modal.is-open {
  display: flex;
}

.modal-dialog {
  position: relative;
  max-width: 960px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
}

.modal-img {
  max-height: 78vh;
  width: auto;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 720px;
  color: #f1f5f9;
  font-size: 0.95rem;
}

.modal-controls {
  display: flex;
  gap: 0.5rem;
}

.modal-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-btn);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.modal-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .skills-grid,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-body,
  .awards-layout,
  .contact-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: var(--s-4) var(--s-6);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child .nav-link {
    border-bottom: none;
  }

  .hero-grid,
  .about-grid,
  .two-col-grid,
  .exp-list {
    grid-template-columns: 1fr;
  }

  .exp-meta-right {
    align-items: flex-start;
  }

  .hero-profile {
    order: -1;
    justify-content: flex-start;
  }

  .profile-frame {
    max-width: 240px;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-h: 60px;
  }

  .wrap {
    padding-inline: var(--s-4);
  }

  .section {
    padding-block: var(--s-7);
  }

  .skills-grid,
  .projects-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .btn-row {
    width: 100%;
  }

  .btn-row .btn {
    flex: 1 1 100%;
  }

  .featured-card,
  .contact-panel,
  .timeline-item,
  .award-card {
    padding: var(--s-5);
  }

  .award-card {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
