/* ============================================================
   DESIGN TOKENS
   ============================================================ */

:root {
  --bg:             #f1f5f9;
  --surface:        #ffffff;
  --border:         #e2e8f0;
  --text:           #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --accent:         #2563eb;
  --accent-dark:    #1d4ed8;
  --accent-subtle:  #eff6ff;
  --hero-bg:        #040d1c;

  --shadow-xs: 0 1px 2px rgba(15,23,42,.05);
  --shadow-sm: 0 1px 4px rgba(15,23,42,.07), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 4px 14px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.12);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --max-w: 1080px;
  --header-h: 64px;
}

/* ============================================================
   RESET + BASE
   ============================================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* No padding-top — transparent header overlays the hero */
}

#about, #projects, #skills, #contact {
  scroll-margin-top: var(--header-h);
}

/* ============================================================
   HEADER — transparent over hero, solid on scroll
   ============================================================ */

.main-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background  0.35s ease,
    border-color 0.35s ease,
    box-shadow  0.35s ease;
}

.main-header.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 20px rgba(15,23,42,0.06);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Default: white text on dark hero */
.site-title {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  letter-spacing: -0.3px;
  line-height: 1.2;
  transition: color 0.3s;
}

.site-subtitle {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  margin-top: 1px;
  transition: color 0.3s;
}

.main-nav {
  display: flex;
  gap: 30px;
}

.main-nav a {
  font-size: 0.86rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.2s;
}

.main-nav a:hover { color: #ffffff; }

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.cv-button {
  padding: 7px 16px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.2s;
}

.cv-button:hover {
  background: rgba(255,255,255,0.22);
  color: #ffffff;
  border-color: rgba(255,255,255,0.4);
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-icons .icon svg {
  width: 19px; height: 19px;
  color: rgba(255,255,255,0.65);
  display: block;
  transition: color 0.2s, transform 0.2s;
}

.social-icons .icon:hover svg {
  color: #ffffff;
  transform: translateY(-1px);
}

/* When scrolled: dark text */
.main-header.scrolled .site-title       { color: var(--text); }
.main-header.scrolled .site-subtitle    { color: var(--text-muted); }
.main-header.scrolled .main-nav a       { color: var(--text-secondary); }
.main-header.scrolled .main-nav a:hover { color: var(--accent); }
.main-header.scrolled .cv-button {
  background: var(--text);
  color: #ffffff;
  border-color: transparent;
}
.main-header.scrolled .cv-button:hover  { background: var(--accent); }
.main-header.scrolled .social-icons .icon svg { color: var(--text-secondary); }
.main-header.scrolled .social-icons .icon:hover svg { color: var(--accent); }

/* ============================================================
   HERO — full viewport, cinematic
   ============================================================ */

.hero {
  min-height: 100vh;
  background: var(--hero-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Animated gradient orbs */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
}

.orb-1 {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(37,99,235,0.28), transparent 70%);
  top: -160px; right: -80px;
  animation: orb1 14s ease-in-out infinite alternate;
}

.orb-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(99,102,241,0.22), transparent 70%);
  bottom: -120px; left: 4%;
  animation: orb2 18s ease-in-out infinite alternate;
}

.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(14,165,233,0.14), transparent 70%);
  top: 42%; left: 52%;
  animation: orb3 11s ease-in-out infinite alternate;
}

@keyframes orb1 {
  from { transform: translate(0, 0) scale(1);   }
  to   { transform: translate(-50px, 40px) scale(1.08); }
}

@keyframes orb2 {
  from { transform: translate(0, 0); }
  to   { transform: translate(40px, -35px); }
}

@keyframes orb3 {
  from { transform: translate(0, 0); }
  to   { transform: translate(-20px, -30px) scale(1.1); }
}

/* Dot grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Bottom fade — blends hero into page */
.hero-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 140px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 64px;
  padding: 80px 24px 100px;
  max-width: 1000px;
  width: 100%;
}

.hero-text {
  text-align: left;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(147,197,253,0.75);
  margin-bottom: 24px;
  animation: fade-up 0.8s cubic-bezier(0.22,1,0.36,1) both;
  animation-delay: 0.05s;
}

.hero-name {
  font-size: clamp(2.6rem, 5.5vw, 3.8rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -2px;
  line-height: 1.0;
  margin-bottom: 20px;
  animation: fade-up 0.8s cubic-bezier(0.22,1,0.36,1) both;
  animation-delay: 0.18s;
}

.hero-sub {
  font-size: 1.08rem;
  color: #94a3b8;
  line-height: 1.8;
  max-width: 480px;
  margin: 0 0 36px;
  animation: fade-up 0.8s cubic-bezier(0.22,1,0.36,1) both;
  animation-delay: 0.32s;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
  animation: fade-up 0.8s cubic-bezier(0.22,1,0.36,1) both;
  animation-delay: 0.46s;
}

.hero-photo-wrap {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(96,165,250,0.35);
  box-shadow: 0 0 0 8px rgba(37,99,235,0.08), 0 0 60px rgba(37,99,235,0.25);
  flex-shrink: 0;
  animation: fade-up 0.8s cubic-bezier(0.22,1,0.36,1) both;
  animation-delay: 0.1s;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.25);
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: fade-up 0.8s cubic-bezier(0.22,1,0.36,1) both;
  animation-delay: 0.62s;
  z-index: 1;
}

.scroll-line {
  width: 1px;
  height: 44px;
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 1px; height: 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
  animation: line-drop 1.8s ease-in-out infinite;
}

@keyframes line-drop {
  0%   { transform: translateY(-100%); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}

/* Entrance animation */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: all 0.18s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 0 0 rgba(37,99,235,0);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.16);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.07);
  color: #ffffff;
  border-color: rgba(255,255,255,0.32);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-subtle);
  transform: translateY(-1px);
}

/* ============================================================
   LAYOUT — SECTIONS
   ============================================================ */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

section:not(.hero) {
  padding: 80px 0;
}

section:not(.hero) + section:not(.hero) {
  border-top: 1px solid var(--border);
}

.section-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-heading {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.7px;
  line-height: 1.15;
}

/* ============================================================
   ABOUT
   ============================================================ */

.about-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 52px;
  align-items: start;
  margin-top: 40px;
}

.about-photo-wrap {
  position: relative;
  flex-shrink: 0;
}

.about-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: linear-gradient(135deg, var(--accent) 0%, rgba(99,102,241,0.6) 100%);
  border-radius: calc(var(--r-lg) + 3px);
  z-index: 0;
  opacity: 0.35;
}

.about-photo {
  width: 200px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--r-lg);
  display: block;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

.about-body p {
  font-size: 0.97rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 14px;
}

.about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--accent-subtle);
  color: var(--accent-dark);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #bfdbfe;
}

/* ============================================================
   PROJECTS — dark-panel treatment
   ============================================================ */

/* Dark section background */
#projects {
  background: linear-gradient(175deg, #07101f 0%, #0d1b30 100%);
  position: relative;
  overflow: hidden;
  border-top: none !important;
}

/* Subtle dot grid overlay (mirrors the hero) */
#projects::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Accent glow line at the top edge */
#projects::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(96,165,250,0.4), transparent);
}

/* Seamless transition back to light bg */
#skills {
  border-top: none !important;
  box-shadow: inset 0 1px 0 var(--border);
}

/* Section label + heading for dark bg */
.proj-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.proj-heading {
  font-size: 1.9rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.7px;
  line-height: 1.15;
  position: relative;
  z-index: 1;
}

.proj-intro {
  font-size: 0.95rem;
  color: #4e6a8a;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

/* ── Grid ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
  position: relative;
  z-index: 1;
}

/* ── Base card (dark glass) ── */
.project-card {
  background: rgba(11, 20, 38, 0.75);
  border: 1px solid rgba(96, 165, 250, 0.1);
  border-top: 2px solid rgba(37, 99, 235, 0.55);
  border-radius: var(--r-lg);
  padding: 26px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity      0.5s ease,
    transform    0.5s ease,
    border-color 0.22s ease,
    box-shadow   0.22s ease;
}

.project-card.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  border-color: rgba(96, 165, 250, 0.32);
  box-shadow:
    0 0 0 1px rgba(96,165,250,0.06),
    0 20px 56px rgba(0,0,0,0.5),
    0 0 80px rgba(37,99,235,0.08);
  transform: translateY(-4px);
}

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.4;
}

.project-card > p {
  font-size: 0.9rem;
  color: #7a97b8;
  line-height: 1.8;
  flex: 1;
}

/* ── Featured card (spans full width) ── */
.project-featured {
  grid-column: 1 / -1;
  border-top: 2px solid rgba(37, 99, 235, 0.9);
  background: rgba(8, 15, 30, 0.9);
}

.project-featured-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.project-featured-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-featured-text h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.3;
}

.project-featured-text > p {
  font-size: 0.93rem;
  color: #7a97b8;
  line-height: 1.85;
}

/* Featured gallery: stacked vertically */
.project-gallery--featured {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: var(--r-md);
  overflow: hidden;
}

.project-gallery--featured img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
  border-radius: var(--r-sm);
  transition: transform 0.25s ease, opacity 0.15s;
}

.project-gallery--featured img:hover {
  opacity: 0.88;
  transform: scale(1.02);
}

/* ── Standard gallery ── */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 6px;
  border-radius: var(--r-md);
  overflow: hidden;
}

.project-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
  transition: transform 0.25s ease, opacity 0.15s;
}

.project-gallery img:hover {
  opacity: 0.88;
  transform: scale(1.04);
}

/* ── Project meta row (number + stat pills) ── */
.proj-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.proj-num {
  font-size: 0.7rem;
  font-weight: 800;
  color: rgba(96, 165, 250, 0.4);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ── Stat pills ── */
.stat-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stat-green {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.stat-blue {
  background: rgba(37, 99, 235, 0.14);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

/* ── Tags on dark bg ── */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag {
  position: relative;
  padding: 3px 10px 3px 20px;
  background: rgba(37, 99, 235, 0.1);
  color: #7eb3e8;
  font-size: 0.71rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  border: 1px solid rgba(96, 165, 250, 0.16);
}

.tag::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tc, rgba(96,165,250,0.5));
}

/* ============================================================
   STAT COUNTERS ROW
   ============================================================ */

.stats-row {
  display: flex;
  align-items: center;
  margin: 44px 0 0;
  padding: 28px 0;
  background: rgba(8, 15, 30, 0.65);
  border: 1px solid rgba(96, 165, 250, 0.1);
  border-radius: var(--r-lg);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.stats-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(37,99,235,0.05) 0%,
    transparent 50%,
    rgba(37,99,235,0.05) 100%);
  pointer-events: none;
}

.stat-block {
  flex: 1;
  text-align: center;
  padding: 8px 20px;
  position: relative;
  z-index: 1;
}

.stat-number {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 30%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-sublabel {
  font-size: 0.66rem;
  color: #3d5a7a;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 52px;
  background: rgba(96, 165, 250, 0.12);
  flex-shrink: 0;
}

/* ============================================================
   BROWSER MOCKUP
   ============================================================ */

.browser-mockup {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.18);
  background: #111c30;
}

.browser-bar {
  height: 30px;
  background: #1a2942;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.browser-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.browser-dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: block;
}

.browser-dots span:nth-child(1) { background: #ef4444; opacity: 0.75; }
.browser-dots span:nth-child(2) { background: #f59e0b; opacity: 0.75; }
.browser-dots span:nth-child(3) { background: #22c55e; opacity: 0.75; }

.browser-url {
  flex: 1;
  height: 17px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  padding: 0 8px;
  max-width: 220px;
  overflow: hidden;
  white-space: nowrap;
  font-family: monospace;
}

.browser-mockup > img {
  width: 100%;
  display: block;
  cursor: zoom-in;
  transition: opacity 0.15s;
}

.browser-mockup > img:hover { opacity: 0.9; }

/* Thumbnail row below main mockup */
.gallery-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.gallery-thumbs img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: zoom-in;
  border-radius: var(--r-sm);
  display: block;
  border: 1px solid rgba(96,165,250,0.12);
  transition: transform 0.25s ease, opacity 0.15s;
}

.gallery-thumbs img:hover {
  opacity: 0.88;
  transform: scale(1.03);
}

/* ============================================================
   TIME COMPARISON CHART (UiPath)
   ============================================================ */

.time-compare {
  background: rgba(4, 10, 22, 0.6);
  border: 1px solid rgba(96, 165, 250, 0.1);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.time-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.time-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: #4e6a8a;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.time-saved-badge {
  font-size: 0.67rem;
  font-weight: 800;
  color: #34d399;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(52,211,153,0.2);
  border-radius: 99px;
  padding: 1px 8px;
}

.time-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-name {
  font-size: 0.7rem;
  color: #64748b;
  width: 80px;
  flex-shrink: 0;
}

.time-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.time-bar {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.time-bar--manual { background: linear-gradient(90deg, #ef4444, #f97316); }
.time-bar--auto   { background: linear-gradient(90deg, #10b981, #34d399); }

.bars-animate .time-bar { width: var(--w); }

.time-val {
  font-size: 0.7rem;
  font-weight: 700;
  color: #7a97b8;
  width: 48px;
  text-align: right;
  flex-shrink: 0;
}

.time-val--green { color: #34d399; }

/* ============================================================
   SKILLS
   ============================================================ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 40px;
}

.skill-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.skill-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(37,99,235,0.12);
  transform: translateY(-2px);
}

.skill-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

/* ============================================================
   CONTACT
   ============================================================ */

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin-top: 40px;
}

.contact-text h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.contact-text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 28px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.contact-link:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(37,99,235,0.12);
  transform: translateY(-2px);
}

.contact-link-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-link-icon svg {
  width: 17px; height: 17px;
  color: var(--accent);
}

.contact-link-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-link-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4,13,28,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(8px);
}

.lightbox.open { display: flex; }

.lightbox-content {
  position: relative;
  max-width: 900px;
  width: min(900px, 95vw);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
  display: block;
}

.lightbox-close {
  position: absolute;
  top: -48px; right: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}

.lightbox-close:hover { color: #ffffff; }

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(15,23,42,0.7);
  color: #f1f5f9;
  width: 46px; height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background 0.15s;
}

.lightbox-prev { left: -58px; }
.lightbox-next { right: -58px; }
.lightbox-arrow:hover { background: var(--accent); }

.lightbox-meta {
  margin-top: 12px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(4,13,28,0.95);
  border-radius: var(--r-md);
  color: #f1f5f9;
  font-size: 0.86rem;
}

#lightbox-caption { flex: 1; }
#lightbox-counter { white-space: nowrap; opacity: 0.55; }

/* ============================================================
   SCROLL REVEAL (skills only — cards handle own animation)
   ============================================================ */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 860px) {
  .main-nav { display: none; }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-photo-wrap { width: fit-content; }
  .about-photo { width: 140px; aspect-ratio: 1; }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 760px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-featured-body { grid-template-columns: 1fr; }
  .stats-row { flex-wrap: wrap; gap: 0; }
  .stat-block { min-width: 33%; padding: 12px 10px; }
  .stat-divider { display: none; }
}

@media (max-width: 560px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 32px; }
  .hero-text { text-align: center; order: 2; }
  .hero-photo-wrap { order: 1; width: 160px; height: 160px; margin: 0 auto; }
  .hero-cta { justify-content: center; }
  .hero-sub { margin: 0 auto 36px; }
  .hero-name { letter-spacing: -1px; }
  .skills-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
  .lightbox-prev { left: -10px; }
  .lightbox-next { right: -10px; }
}
