/* ============================================================
   Aryan Imanipour · Portfolio
   Dark, security-inspired theme. Vanilla CSS, no build step.
   ============================================================ */

:root {
  --bg:        #050608;
  --bg-soft:   #0a0c10;
  --card:      #0b0e13;
  --card-2:    #0e1219;
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.14);

  --text:      #f4f6fb;
  --muted:     #9aa3b2;
  --muted-2:   #69707d;

  --accent:    #3b82f6;   /* blue-500 */
  --accent-2:  #60a5fa;   /* blue-400 */
  --accent-3:  #93c5fd;   /* blue-300 */
  --amber:     #f59e0b;
  --green:     #34d399;

  --maxw: 1180px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --radius: 18px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

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

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(59, 130, 246, 0.35); color: #fff; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- Shared utilities ---------- */
.outline {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35);
  text-stroke: 1px rgba(255, 255, 255, 0.35);
}

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
  animation: pulse 2s infinite;
}
.dot--amber { background: var(--amber); box-shadow: 0 0 10px var(--amber); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Film grain ---------- */
.noise {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  z-index: 9500;
  box-shadow: 0 0 10px var(--accent);
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent-2);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(96, 165, 250, 0.55);
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
              background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.cursor-ring.is-hover {
  width: 56px; height: 56px;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.9);
}
@media (pointer: fine) {
  body.cursor-ready { cursor: none; }
  body.cursor-ready a,
  body.cursor-ready button { cursor: none; }
  body.cursor-ready .cursor-dot,
  body.cursor-ready .cursor-ring { opacity: 1; }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 8000;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
              backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(5, 6, 8, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.nav__brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 0.8rem;
  background: linear-gradient(135deg, rgba(59,130,246,0.18), transparent);
  color: var(--accent-2);
}
.nav__brand-text { font-size: 1rem; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav__links a {
  position: relative;
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0.9rem; right: 0.9rem; bottom: 0.28rem;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
}
.nav__cta {
  color: var(--text) !important;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.03);
}
.nav__cta:hover { border-color: rgba(96,165,250,0.5); background: rgba(59,130,246,0.1); }
.nav__cta::after { display: none; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
}
.nav__toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 0 var(--pad) 1.5rem;
  gap: 0.25rem;
  background: rgba(5, 6, 8, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a {
  padding: 0.85rem 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: 0; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem var(--pad) 4rem;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 42%, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 42%, #000 35%, transparent 78%);
  animation: gridPan 30s linear infinite;
}
@keyframes gridPan {
  to { background-position: 56px 56px; }
}
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
}
.hero__glow--1 {
  width: 540px; height: 540px;
  background: rgba(59, 130, 246, 0.22);
  top: 8%; left: 12%;
  animation: float1 14s ease-in-out infinite;
}
.hero__glow--2 {
  width: 460px; height: 460px;
  background: rgba(37, 99, 235, 0.16);
  bottom: 6%; right: 10%;
  animation: float2 18s ease-in-out infinite;
}
@keyframes float1 { 50% { transform: translate(40px, 30px); } }
@keyframes float2 { 50% { transform: translate(-36px, -28px); } }

.hero__content { position: relative; z-index: 1; max-width: 880px; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: clamp(0.65rem, 2.4vw, 0.8rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 1.8rem;
}

.hero__name {
  font-size: clamp(2.9rem, 13vw, 9rem);
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.92;
}
.hero__name .scramble {
  display: block;
  cursor: default;
}
.scramble { white-space: nowrap; }
.scramble-glitch { color: var(--accent-2); }
.hero__name .outline .scramble-glitch { -webkit-text-stroke: 0; color: var(--accent-2); }

.hero__tagline {
  margin-top: 1.8rem;
  font-size: clamp(1.05rem, 3.6vw, 1.65rem);
  font-weight: 600;
  color: var(--accent-3);
  letter-spacing: -0.01em;
}

.hero__intro {
  margin: 1.2rem auto 0;
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.6vw, 1.1rem);
}

.hero__actions {
  margin-top: 2.4rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.hero__scroll-line {
  display: block;
  width: 1px; height: 46px;
  background: linear-gradient(to bottom, var(--accent-2), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 1; transform-origin: top; }
  50% { transform: scaleY(0.5); opacity: 0.4; transform-origin: top; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  overflow: hidden;
  transition: transform 0.2s var(--ease), border-color 0.25s var(--ease),
              background 0.25s var(--ease);
}
.btn__icon { width: 18px; height: 18px; position: relative; z-index: 1; }
.btn__label { position: relative; z-index: 1; }
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 30px -8px rgba(59,130,246,0.6);
}
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--primary .btn__icon { color: #fff; }
.btn--ghost {
  background: rgba(255,255,255,0.03);
  color: var(--text);
}
.btn--ghost:hover { border-color: rgba(96,165,250,0.55); background: rgba(59,130,246,0.1); }
.btn:active { transform: scale(0.96); }
.btn:hover .btn__icon { transform: translateX(2px); }
.btn--primary:hover .btn__icon { transform: translateY(2px); }

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4.5rem, 11vw, 9rem) var(--pad);
}
.section__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.section__index {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  letter-spacing: 0.2em;
  padding-top: 0.35rem;
}
.section__title {
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 1;
}
.section__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about__lead {
  font-size: clamp(1.3rem, 3.6vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 1.4rem;
}
.about__lead em { color: var(--accent-2); font-style: italic; }
.about__body { color: var(--muted); font-size: 1.02rem; }
.about__body strong { color: var(--text); font-weight: 600; }

.about__stats {
  list-style: none;
  padding: 0;
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2.2rem;
}
.about__stats li { display: flex; flex-direction: column; }
.about__stat-num {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 900;
  color: var(--accent-2);
  letter-spacing: -0.03em;
  line-height: 1;
}
.about__stat-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  margin-top: 0.5rem;
  max-width: 140px;
}

/* ---------- Terminal ---------- */
.terminal {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.8);
  position: sticky;
  top: 6rem;
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.terminal__dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #2a2f3a;
}
.terminal__dot:nth-child(1) { background: #ff5f56; }
.terminal__dot:nth-child(2) { background: #ffbd2e; }
.terminal__dot:nth-child(3) { background: #27c93f; }
.terminal__title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted-2);
}
.terminal__body {
  padding: 1.3rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.9;
  color: var(--muted);
}
.terminal__body p { white-space: pre-wrap; word-break: break-word; }
.t-prompt { color: var(--accent-2); margin-right: 0.5rem; }
.t-out { color: var(--text); padding-left: 1.1rem; }
.t-ok { color: var(--green); }
.t-cursor { color: var(--accent-2); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   PROJECTS
   ============================================================ */
.projects__list {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}
.project {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  padding: clamp(1.5rem, 4vw, 2.6rem);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
              box-shadow 0.4s var(--ease);
  transform-style: preserve-3d;
}
.project:hover {
  border-color: rgba(96,165,250,0.35);
  box-shadow: 0 40px 80px -40px rgba(59,130,246,0.4);
}
.project__glow {
  position: absolute;
  top: -40%; right: -20%;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(59,130,246,0.16), transparent 65%);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}
.project:hover .project__glow { opacity: 1; }

.project__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.3rem;
}
.project__num {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--accent-2);
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.project__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.22);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.tag--muted { color: var(--muted-2); background: rgba(255,255,255,0.03); border-color: var(--line); }

.project__title {
  font-size: clamp(1.5rem, 4.4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.9rem;
}
.project__desc {
  color: var(--muted);
  max-width: 60ch;
  font-size: 1rem;
}
.project__desc strong { color: var(--text); font-weight: 600; }

.project__points {
  list-style: none;
  padding: 0;
  margin-top: 1.4rem;
  display: grid;
  gap: 0.7rem;
}
.project__points li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: var(--text);
  font-size: 0.95rem;
}
.project__points svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--green);
  margin-top: 3px;
}

/* Problem / Solution */
.project__ps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.6rem;
}
.ps {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
}
.ps p { color: var(--muted); font-size: 0.92rem; }
.ps__label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}
.ps__label--problem { color: #fca5a5; background: rgba(248,113,113,0.12); }
.ps__label--solution { color: var(--green); background: rgba(52,211,153,0.12); }

/* Flow diagram */
.flow {
  margin-top: 1.6rem;
  padding: 1.8rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(59,130,246,0.06), transparent 60%),
    rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.flow__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}
.flow__node {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--card-2);
  white-space: nowrap;
}
.flow__node--accent {
  color: var(--accent-2);
  border-color: rgba(96,165,250,0.5);
  background: rgba(59,130,246,0.12);
  box-shadow: 0 0 26px -8px rgba(59,130,246,0.7);
}
.flow__node--alert {
  color: var(--amber);
  border-color: rgba(245,158,11,0.45);
  background: rgba(245,158,11,0.1);
}
.flow__cap {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: var(--muted-2);
}
.flow__arrow {
  width: 1.5px;
  height: 28px;
  margin: 0.6rem 0;
  background: linear-gradient(var(--accent-2), rgba(96,165,250,0.15));
  position: relative;
}
.flow__arrow::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 50%;
  transform: translateX(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--accent-2);
}
.flow__branches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  max-width: 480px;
}
.flow__branches .flow__step {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
}

.project__metrics {
  list-style: none;
  padding: 0;
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem;
}
.project__metrics li { display: flex; flex-direction: column; }
.metric__num {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent-2);
}
.metric__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  margin-top: 0.5rem;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.skill {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 1.4rem 1.4rem 1.5rem;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
              background 0.3s var(--ease);
}
.skill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(140px 140px at var(--mx, 50%) var(--my, 0%), rgba(59,130,246,0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.skill:hover {
  transform: translateY(-4px);
  border-color: rgba(96,165,250,0.4);
  background: var(--card-2);
}
.skill:hover::before { opacity: 1; }
.skill__icon {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--accent-2);
  margin-bottom: 1rem;
}
.skill__icon svg { width: 22px; height: 22px; }
.skill__name {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.skill__sub {
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

/* ============================================================
   EDUCATION
   ============================================================ */
.edu {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  padding: clamp(1.6rem, 4vw, 2.8rem);
}
.edu__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.edu__degree {
  font-size: clamp(1.25rem, 3.6vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.edu__inst { color: var(--accent-2); font-family: var(--mono); font-size: 0.85rem; margin-top: 0.4rem; }
.edu__period {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.3);
  background: rgba(245,158,11,0.07);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}
.edu__desc { color: var(--muted); max-width: 70ch; margin-bottom: 2rem; }

.edu__courses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.course {
  border-left: 2px solid rgba(59,130,246,0.4);
  padding: 0.2rem 0 0.2rem 1.1rem;
}
.course h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.course p { color: var(--muted); font-size: 0.9rem; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  position: relative;
  max-width: none;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.contact__bg {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 360px;
  background: radial-gradient(circle, rgba(59,130,246,0.12), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}
.contact__inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) var(--pad) 3rem;
  text-align: center;
}
.contact__status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--amber);
  margin-bottom: 1.8rem;
}
.contact__title {
  font-size: clamp(2.8rem, 13vw, 7rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.92;
}
.contact__lead {
  margin: 1.6rem auto 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 1.05rem;
}
.contact__actions {
  margin-top: 2.4rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.contact__links {
  margin-top: 3.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  text-align: left;
}
.contact__link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1 1 240px;
  max-width: 340px;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.contact__link:hover {
  transform: translateY(-3px);
  border-color: rgba(96,165,250,0.4);
  background: var(--card-2);
}
.contact__link-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}
.contact__link-value { font-weight: 600; font-size: 0.95rem; word-break: break-word; }

.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem var(--pad) 3rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translate(-50%, 120%);
  z-index: 9700;
  background: var(--card-2);
  border: 1px solid rgba(96,165,250,0.4);
  color: var(--text);
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.8);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; }
  .terminal { position: static; }
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .project__ps { grid-template-columns: 1fr; }
  .edu__courses { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .mobile-menu.is-open { display: flex; }
  .section__rule { display: none; }
}

@media (max-width: 520px) {
  .skills__grid { grid-template-columns: 1fr; }
  .flow__branches { grid-template-columns: 1fr; }
  .hero__actions .btn,
  .contact__actions .btn { width: 100%; justify-content: center; }
  .about__stats { gap: 1.5rem; }
  .project__metrics { gap: 1.6rem; }
}

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