/* =====================================================================
   Marios Xenofontos -- Portfolio 2026
   Vanilla CSS. Dark-first with a light theme via [data-theme="light"].
   ===================================================================== */

/* ---------- Tokens ---------- */
:root,
[data-theme="dark"] {
  --bg: #0a0b0f;
  --bg-2: #0e1016;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #e9edf4;
  --muted: #9aa4b6;
  --faint: #6b7488;
  --accent: #6ea8ff;
  --accent-2: #8b7bff;
  --accent-soft: rgba(110, 168, 255, 0.14);
  --shadow: 0 20px 60px -25px rgba(0, 0, 0, 0.8);
  --glass-blur: 14px;
  --blob-1: rgba(110, 168, 255, 0.12);
  --blob-2: rgba(139, 123, 255, 0.12);
  --blob-3: rgba(110, 168, 255, 0.07);
  --banner: linear-gradient(135deg, rgba(110,168,255,0.16), rgba(139,123,255,0.10));
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #eef1f8;
  --bg-2: #f4f6fc;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-2: rgba(255, 255, 255, 0.42);
  --line: rgba(20, 30, 70, 0.10);
  --line-strong: rgba(20, 30, 70, 0.18);
  --text: #161a23;
  --muted: #4f5870;
  --faint: #79829a;
  --accent: #2f6bff;
  --accent-2: #6d4bff;
  --accent-soft: rgba(47, 107, 255, 0.12);
  --shadow: 0 22px 55px -26px rgba(40, 60, 120, 0.45);
  --glass-blur: 16px;
  --blob-1: rgba(120, 150, 255, 0.30);
  --blob-2: rgba(175, 130, 255, 0.26);
  --blob-3: rgba(120, 195, 255, 0.24);
  --banner: linear-gradient(135deg, rgba(47,107,255,0.12), rgba(109,75,255,0.08));
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: transparent;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Fixed decorative gradient field behind everything - gives glass something to frost. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(46% 38% at 12% 4%, var(--blob-1), transparent 70%),
    radial-gradient(44% 38% at 88% 12%, var(--blob-2), transparent 70%),
    radial-gradient(60% 50% at 50% 102%, var(--blob-3), transparent 70%);
}

.mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; }

/* Frosted-glass surfaces (work in both themes) */
.highlight-card, .project-card, .sec-card, .skill-category,
.timeline-content, .contact-item, .contact-cta, .status-pill {
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 30px -18px rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .highlight-card, [data-theme="light"] .project-card,
[data-theme="light"] .sec-card, [data-theme="light"] .skill-category,
[data-theme="light"] .timeline-content, [data-theme="light"] .contact-item,
[data-theme="light"] .contact-cta, [data-theme="light"] .status-pill {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 14px 40px -26px rgba(40, 60, 120, 0.5);
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 12px; top: 12px; }

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

/* ---------- Navigation ---------- */
.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.navbar.scrolled { border-bottom-color: var(--line); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.nav-brand { display: inline-flex; align-items: center; font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em; color: var(--text); }
.brand-path { color: var(--accent); }

.nav-menu { display: flex; gap: 30px; list-style: none; }
.nav-menu a { color: var(--muted); font-weight: 500; font-size: 0.94rem; position: relative; transition: color 0.2s; }
.nav-menu a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width 0.25s ease;
}
.nav-menu a:hover { color: var(--text); }
.nav-menu a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  display: grid; place-items: center; transition: all 0.2s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px;
  border-radius: 12px; font-weight: 600; font-size: 0.95rem; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  border: 1px solid transparent;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 10px 30px -10px var(--accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px var(--accent); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: 120px 0 80px; overflow: hidden;
}
.hero-aurora {
  position: absolute; inset: -30% -10% auto -10%; height: 80vh; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 50% at 25% 30%, rgba(110, 168, 255, 0.35), transparent 70%),
    radial-gradient(40% 50% at 75% 25%, rgba(139, 123, 255, 0.30), transparent 70%);
  filter: blur(60px); opacity: 0.9;
  animation: drift 18s ease-in-out infinite alternate;
}
[data-theme="light"] .hero-aurora { opacity: 0.8; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1);} to { transform: translate3d(4%,3%,0) scale(1.1);} }
.hero-orbs { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(55px); opacity: 0.6; mix-blend-mode: screen; will-change: transform; }
.orb-1 { width: 380px; height: 380px; top: -70px; left: -50px; background: radial-gradient(circle at 35% 35%, #6ea8ff, transparent 70%); animation: float1 17s ease-in-out infinite alternate; }
.orb-2 { width: 320px; height: 320px; top: 12%; right: -70px; background: radial-gradient(circle at 50% 50%, #8b7bff, transparent 70%); animation: float2 21s ease-in-out infinite alternate; }
.orb-3 { width: 280px; height: 280px; bottom: -60px; left: 28%; background: radial-gradient(circle at 50% 50%, #38bdf8, transparent 70%); animation: float3 19s ease-in-out infinite alternate; }
.orb-4 { width: 220px; height: 220px; top: 30%; left: 40%; background: radial-gradient(circle at 50% 50%, #c084fc, transparent 70%); animation: float1 23s ease-in-out infinite alternate; }
[data-theme="light"] .orb { opacity: 0.4; mix-blend-mode: multiply; filter: blur(60px); }
@keyframes float1 { to { transform: translate(45px, 35px) scale(1.18); } }
@keyframes float2 { to { transform: translate(-55px, 45px) scale(1.12); } }
@keyframes float3 { to { transform: translate(35px, -45px) scale(1.22); } }
.hero-content { position: relative; z-index: 1; max-width: 880px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.82rem; color: var(--muted); margin-bottom: 28px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }

.hero-title {
  font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em;
  padding-bottom: 0.05em;
  background: linear-gradient(135deg, var(--text) 35%, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  margin-top: 14px; font-size: clamp(1.1rem, 3vw, 1.6rem); font-weight: 600; color: var(--accent);
  display: flex; align-items: center; gap: 10px; min-height: 2.2em;
}
.hero-subtitle .mono { color: var(--faint); }
.cursor { display: inline-block; width: 3px; background: var(--accent); animation: blink 1s steps(2) infinite; align-self: stretch; }
@keyframes blink { 50% { opacity: 0; } }

/* Terminal - roles type out at a Linux shell prompt */
.hero-terminal {
  margin-top: 22px; width: min(560px, 100%); border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 12, 18, 0.74);
  backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 26px 60px -26px rgba(0, 0, 0, 0.75);
}
[data-theme="light"] .hero-terminal { background: rgba(14, 17, 26, 0.94); border-color: rgba(0, 0, 0, 0.25); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 9px 13px; background: rgba(255, 255, 255, 0.06); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f56; } .dot.y { background: #ffbd2e; } .dot.g { background: #27c93f; }
.term-title { margin-left: 8px; font-size: 0.72rem; color: #828b9e; }
.term-body { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; padding: 15px 16px; min-height: 1.9em; font-size: clamp(0.8rem, 2.4vw, 1.02rem); color: #e6e9f0; white-space: nowrap; overflow: hidden; }
.term-prompt { color: #cdd4e0; white-space: nowrap; flex-shrink: 0; }
.typed-text { white-space: nowrap; }
.term-prompt .u { color: #8ae234; }
.term-prompt .p { color: #729fcf; }
.typed-text { color: #f3f5f9; }
.term-body .cursor { width: 9px; height: 1.15em; background: #8ae234; align-self: center; border-radius: 1px; }

.hero-lede { margin-top: 26px; max-width: 640px; font-size: 1.08rem; color: var(--muted); }
.hero-lede strong { color: var(--text); font-weight: 600; }

.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stack { margin-top: 50px; border-top: 1px solid var(--line); padding-top: 24px; max-width: 760px; }
.hero-stack-label {
  display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 16px;
}
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-wrap { position: relative; }
.marquee-row { display: flex; gap: 12px; width: max-content; animation: stack-scroll 36s linear infinite; }
.ms {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: 0.82rem; font-weight: 500; color: var(--text);
  padding: 9px 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.ms i { color: var(--accent); font-size: 1.05em; }
@keyframes stack-scroll { to { transform: translateX(-50%); } }


/* ---------- Section scaffolding ---------- */
.section, .hero { scroll-margin-top: 72px; }
.section { padding: 100px 0; }
.section-kicker {
  display: inline-flex; align-items: center; gap: 11px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
  padding: 6px 16px 6px 6px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.section-kicker .mono {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0;
  box-shadow: 0 6px 14px -5px var(--accent);
}
.section-title {
  font-size: clamp(1.8rem, 4.2vw, 2.7rem); font-weight: 800; letter-spacing: -0.025em; max-width: 24ch;
  line-height: 1.18; padding-bottom: 0.08em; color: var(--text);
}
.section-intro { margin-top: 18px; max-width: 70ch; color: var(--muted); font-size: 1.04rem; }
.section-intro .mono { color: var(--accent); font-size: 0.92em; }
.stack-inline { color: var(--accent); font-weight: 600; }

/* ---------- About ---------- */
.about {
  background:
    radial-gradient(42% 46% at 14% 8%, rgba(110, 168, 255, 0.16), transparent 70%),
    radial-gradient(40% 44% at 88% 92%, rgba(139, 123, 255, 0.13), transparent 70%),
    var(--bg-2);
  border-block: 1px solid var(--line);
}
.about-content { margin-top: 44px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.about-text p { color: var(--muted); margin-bottom: 18px; font-size: 1.06rem; }
.about-text strong { color: var(--text); font-weight: 600; }
.grad {
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.about-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.highlight-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.highlight-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.highlight-card i { font-size: 1.4rem; color: var(--accent); margin-bottom: 12px; }
.highlight-card h3 { font-size: 1rem; margin-bottom: 5px; }
.highlight-card p { font-size: 0.9rem; color: var(--faint); }

/* ---------- Work ---------- */
.work-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 26px; transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.project-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.project-icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); font-size: 1.2rem;
}
.project-tags { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
}
.chip::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.project-title { font-size: 1.22rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.28; margin-bottom: 12px; }
.project-problem { font-size: 0.92rem; color: var(--muted); margin-bottom: 12px; }
.project-problem strong { color: var(--accent); }
.project-desc { font-size: 0.94rem; color: var(--muted); margin-bottom: 18px; }
.project-desc em { color: var(--text); font-style: normal; font-weight: 600; }
.project-roles { list-style: none; display: grid; gap: 8px; margin-bottom: 20px; }
.project-roles li { font-size: 0.86rem; color: var(--faint); display: flex; gap: 10px; align-items: baseline; }
.role {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  padding: 4px 10px; border-radius: 7px; flex-shrink: 0; min-width: 88px; text-align: center;
}
.project-stack { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 7px; }
.stack-tag {
  font-size: 0.72rem; font-weight: 500; color: var(--muted);
  padding: 5px 11px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.stack-tag:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Security ---------- */
.security {
  background:
    radial-gradient(44% 48% at 86% 10%, rgba(56, 189, 248, 0.15), transparent 70%),
    radial-gradient(42% 46% at 8% 90%, rgba(192, 132, 252, 0.13), transparent 70%),
    var(--bg-2);
  border-block: 1px solid var(--line);
}
.security-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sec-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; transition: border-color 0.25s ease, transform 0.25s ease; }
.sec-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.sec-card i { font-size: 1.5rem; color: var(--accent); margin-bottom: 14px; }
.sec-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.sec-card p { font-size: 0.92rem; color: var(--muted); }

/* ---------- Experience timeline ---------- */
.timeline { margin-top: 48px; max-width: 980px; display: grid; gap: 22px; }
.timeline-marker { display: none; }
.timeline-content { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease; }
.timeline-content::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); z-index: 2; }
.timeline-content:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.timeline-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 22px 26px; border-bottom: 1px solid var(--line); background: var(--banner); }
.job-lockup { display: flex; align-items: center; gap: 15px; }
.company-badge {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  color: #fff; font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1.3rem;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 22px -8px var(--accent), inset 0 2px 2px rgba(255,255,255,0.35), inset 0 -3px 6px rgba(0,0,0,0.25);
  transform: perspective(500px) rotateX(8deg) rotateY(-8deg); transition: transform 0.3s ease;
}
.timeline-content:hover .company-badge { transform: perspective(500px) rotateX(0) rotateY(0) scale(1.05); }
.timeline-header h3 { font-size: 1.3rem; }
.timeline-header h4 { font-size: 1rem; font-weight: 500; color: var(--accent); margin-top: 3px; }
.timeline-date { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.timeline-description { padding: 22px 26px; color: var(--muted); border-bottom: 1px solid var(--line); }
.achievements { padding: 24px 26px; }
.achievements h5, .tech-stack h5 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 16px; font-family: 'JetBrains Mono', monospace; }
.achievements ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.achievements li {
  position: relative; padding: 16px 18px 16px 46px; color: var(--muted); font-size: 0.92rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.achievements li:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.achievements li::before {
  content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.7rem;
  position: absolute; left: 14px; top: 15px; width: 20px; height: 20px; border-radius: 7px;
  display: grid; place-items: center; color: var(--accent); background: var(--accent-soft);
}
.achievements li strong { color: var(--text); font-weight: 600; }
.tech-stack { padding: 0 26px 26px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 0.8rem; font-weight: 600; padding: 7px 14px; border-radius: 9px;
  color: var(--text); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent);
  transition: all 0.2s ease; cursor: default;
}
.tag:hover { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; transform: translateY(-2px); box-shadow: 0 10px 20px -7px var(--accent); }

/* ---------- Skills ---------- */
.skills-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-category { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; transition: transform 0.25s ease, border-color 0.25s ease; }
.skill-category:hover { transform: translateY(-4px); border-color: var(--accent); }
.category-icon { font-size: 1.8rem; margin-bottom: 14px; }
.skill-category h3 { font-size: 1.12rem; margin-bottom: 16px; }
.skill-list { list-style: none; display: grid; gap: 11px; }
.skill-list li { font-size: 0.9rem; color: var(--muted); padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.skill-list li:last-child { border-bottom: none; padding-bottom: 0; }
.skill-list strong { color: var(--text); font-weight: 600; }

/* ---------- Contact ---------- */
.contact {
  background:
    radial-gradient(48% 52% at 50% -2%, rgba(139, 123, 255, 0.16), transparent 70%),
    radial-gradient(42% 46% at 92% 82%, rgba(110, 168, 255, 0.13), transparent 70%),
    var(--bg-2);
  border-top: 1px solid var(--line);
}
.contact-content { margin-top: 44px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: start; }
.contact-info { display: grid; gap: 14px; }
.contact-item { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: transform 0.2s ease, border-color 0.2s ease; }
.contact-item:hover { transform: translateX(4px); border-color: var(--accent); }
.contact-item > i:first-child { font-size: 1.4rem; color: var(--accent); width: 28px; text-align: center; }
.contact-item h4 { font-size: 0.95rem; }
.contact-item span { font-size: 0.86rem; color: var(--faint); }
.link-out { margin-left: auto; font-size: 0.8rem; color: var(--faint); }
.contact-cta { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px; }
.contact-cta h3 { font-size: 1.4rem; margin-bottom: 14px; }
.contact-cta p { color: var(--muted); margin-bottom: 22px; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0; background: var(--bg); }
.footer-content { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer p { color: var(--muted); font-size: 0.88rem; }
.footer-tech { color: var(--faint) !important; font-size: 0.78rem !important; }

/* ---------- 3D icon badges ---------- */
.project-icon,
.highlight-card > i:first-child,
.sec-card > i:first-child {
  display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 15px; margin-bottom: 14px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #fff !important; font-size: 1.35rem;
  box-shadow:
    0 12px 24px -8px var(--accent),
    inset 0 2px 3px rgba(255, 255, 255, 0.4),
    inset 0 -4px 8px rgba(0, 0, 0, 0.28);
  transform: perspective(550px) rotateX(9deg) rotateY(-9deg);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}
/* the project icon lives in a flex row, keep its margin tidy */
.project-icon { margin-bottom: 0; }
.highlight-card:hover > i:first-child,
.sec-card:hover > i:first-child,
.project-card:hover .project-icon {
  transform: perspective(550px) rotateX(0) rotateY(0) translateY(-4px) scale(1.06);
  box-shadow: 0 18px 34px -10px var(--accent), inset 0 2px 3px rgba(255,255,255,0.45), inset 0 -4px 8px rgba(0,0,0,0.3);
}

/* Emoji skill icons - give them a floating 3D presence */
.category-icon {
  display: inline-block;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.35));
  transform: perspective(500px) rotateX(10deg);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.skill-category:hover .category-icon { transform: perspective(500px) rotateX(0) translateY(-4px) scale(1.12); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .about-content { grid-template-columns: 1fr; gap: 32px; }
  .work-grid, .security-grid, .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-content { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-menu {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 8px 0; transform: translateY(-120%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    box-shadow: var(--shadow);
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu li { width: 100%; }
  .nav-menu a { display: block; padding: 14px 24px; font-size: 1rem; }
  .nav-menu a::after { display: none; }
  .nav-toggle { display: flex; }

  .section { padding: 72px 0; }
  .hero { padding: 110px 0 64px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .work-grid, .security-grid, .skills-grid { grid-template-columns: 1fr; }
  .achievements ul { grid-template-columns: 1fr; }
  .timeline-header { flex-direction: column; align-items: flex-start; }
  .footer-content { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .nav-brand { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
