/* =====================================================================
   Arun Sharma — Portfolio
   styles.css — modular architecture
   1. Tokens / Theme       2. Reset / Base      3. Utilities
   4. Components           5. Sections          6. Premium features
   7. Animations           8. Responsive        9. Reduced motion
   ===================================================================== */

/* ============ 1. TOKENS / THEME — Apple Liquid Glass ============ */
:root {
  --bg: #000000;
  --bg-2: #0a0a0c;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.12);
  --surface-3: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.24);
  --glass-highlight: rgba(255, 255, 255, 0.28);
  --glass-shadow: rgba(0, 0, 0, 0.35);

  --text: #f5f5f7;
  --text-soft: rgba(245, 245, 247, 0.72);
  --text-mute: rgba(245, 245, 247, 0.48);

  --primary: #0a84ff;
  --primary-2: #5e5ce6;
  --cyan: #64d2ff;
  --grad: linear-gradient(135deg, #0a84ff 0%, #5e5ce6 45%, #bf5af2 100%);
  --grad-soft: linear-gradient(135deg, rgba(10,132,255,.14), rgba(94,92,230,.10));

  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: inset 0 1px 0 var(--glass-highlight), 0 16px 48px rgba(0, 0, 0, 0.4);
  --glass-blur: blur(44px) saturate(190%);

  --radius: 22px;
  --radius-lg: 28px;
  --radius-sm: 14px;
  --radius-pill: 100px;

  --maxw: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(.25, .1, .25, 1);
  --dur: .45s;
}

[data-theme="light"] {
  --bg: #f5f5f7;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-2: rgba(255, 255, 255, 0.82);
  --surface-3: rgba(255, 255, 255, 0.5);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --glass-highlight: rgba(255, 255, 255, 0.9);
  --text: #1d1d1f;
  --text-soft: rgba(29, 29, 31, 0.72);
  --text-mute: rgba(29, 29, 31, 0.48);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(10, 132, 255, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 80%, rgba(94, 92, 230, 0.10), transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(191, 90, 242, 0.06), transparent 60%);
}

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

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }

::selection { background: rgba(10, 132, 255, 0.35); color: #fff; }

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

/* ============ 3. UTILITIES ============ */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(4.5rem, 9vw, 8rem); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

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

.glass {
  position: relative;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.06) 42%,
    rgba(255, 255, 255, 0.03) 100%
  );
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    0 8px 32px var(--glass-shadow);
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.08) 0%, transparent 38%);
  pointer-events: none;
  z-index: 0;
}
.glass > * { position: relative; z-index: 1; }
.card { border-radius: var(--radius); }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 1000;
  background: var(--primary); color: #fff; padding: .7rem 1.1rem; border-radius: 10px;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* section headers */
.section__head { text-align: center; max-width: 640px; margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.section__tag {
  display: inline-block; font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--primary);
  padding: .4rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface-3); margin-bottom: 1rem;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.section__title { font-size: clamp(1.9rem, 4.5vw, 3rem); }
.section__sub { color: var(--text-soft); margin-top: .9rem; font-size: 1.05rem; }

.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tag-list li {
  font-family: var(--font-mono); font-size: .72rem; color: var(--text-soft);
  padding: .25rem .6rem; border: 1px solid var(--border); border-radius: 100px;
  background: var(--surface);
}

/* ============ 4. COMPONENTS ============ */
/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; justify-content: center;
  padding: .85rem 1.5rem; border-radius: 100px; font-weight: 600; font-size: .95rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
  will-change: transform; white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(.99); }

.btn--primary {
  background: var(--grad); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 24px rgba(10,132,255,.35);
}
.btn--primary:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 12px 32px rgba(10,132,255,.45); }

.btn--glass {
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.btn--glass:hover { background: var(--surface); border-color: rgba(255,255,255,.32); }

.btn--ghost {
  border: 1px solid var(--border); color: var(--text-soft);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn--ghost:hover { color: var(--text); border-color: var(--border-strong); }

.btn--mini { padding: .55rem 1rem; font-size: .82rem; }
.btn--block { width: 100%; }

.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-3); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  color: var(--text-soft); transition: all .3s var(--ease);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); transform: translateY(-1px); }

.chip {
  padding: .5rem 1.1rem; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface-3); color: var(--text-soft); font-size: .85rem; font-weight: 500;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: all .3s var(--ease);
}
.chip:hover { color: var(--text); background: var(--surface); }
.chip.is-active {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 16px rgba(10,132,255,.3);
}
.chip--sm { padding: .2rem .65rem; font-size: .72rem; }

.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #34d399; display: inline-block;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite;
}

/* ============ 5. SECTIONS ============ */

/* --- Navbar — floating glass pill --- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: .75rem var(--gutter);
  transition: padding .4s var(--ease);
}
.nav.is-scrolled { padding-block: .5rem; }
.nav.is-scrolled .nav__inner {
  max-width: calc(var(--maxw) - 2rem);
  margin-inline: auto;
  padding: .55rem 1.1rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 12px 40px rgba(0,0,0,.35);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; padding-block: .5rem; transition: all .4s var(--ease); }
.nav__brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; }
.nav__brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--grad); color: #fff; font-size: .8rem; letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.nav__brand-text { font-size: 1.15rem; }
.nav__links { display: flex; gap: .35rem; }
.nav__links a {
  padding: .5rem .9rem; border-radius: 100px; color: var(--text-soft); font-weight: 500; font-size: .92rem;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active {
  color: var(--text); background: rgba(255,255,255,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.nav__actions { display: flex; align-items: center; gap: .6rem; }
.nav__cta { padding: .6rem 1.2rem; }
.nav__burger { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 12px; }
.nav__burger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero --- */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 7rem; }
.hero__particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .7; }
.hero__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
}
.hero__col--main { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.hero__col--visual { display: flex; flex-direction: column; align-items: center; gap: 1rem; min-width: 0; }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .55rem; color: var(--text-soft); font-size: .88rem;
  padding: .45rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface-3); margin-bottom: 1.5rem; width: fit-content;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.hero__title { font-size: clamp(2.2rem, 5.2vw, 3.5rem); font-weight: 700; letter-spacing: -0.03em; }
.hero__role { font-size: clamp(1.15rem, 2.8vw, 1.75rem); color: var(--text-soft); margin-top: .6rem; font-weight: 600; min-height: 1.4em; }
.typed { color: var(--text); background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.typed__caret { color: var(--cyan); font-weight: 400; animation: blink 1s step-end infinite; }
.hero__desc { color: var(--text-soft); max-width: 52ch; margin-top: 1.2rem; font-size: clamp(.95rem, 1.8vw, 1.05rem); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.hero__socials { display: flex; gap: 1rem; margin-top: 1.4rem; font-size: 1.15rem; color: var(--text-mute); }
.hero__socials a { transition: color .25s var(--ease), transform .25s var(--ease); }
.hero__socials a:hover { color: var(--text); transform: translateY(-3px); }

/* Terminal panel */
.hero__terminal {
  margin-top: 1.6rem; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 16px 48px rgba(0,0,0,.4);
  max-width: 100%;
}
.terminal__chrome {
  display: flex; align-items: center; gap: .45rem; padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.terminal__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.terminal__dot--red { background: #ff5f57; }
.terminal__dot--yellow { background: #febc2e; }
.terminal__dot--green { background: #28c840; }
.terminal__title {
  margin-left: .4rem; font-family: var(--font-mono); font-size: .72rem;
  color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.terminal__status {
  margin-left: auto; font-family: var(--font-mono); font-size: .68rem; color: #34d399;
  display: inline-flex; align-items: center; gap: .35rem; flex-shrink: 0;
}
.terminal__status i { font-size: .45rem; animation: pulse 2s infinite; }
.terminal__body {
  padding: 1rem 1.1rem 1.1rem; min-height: 210px; max-height: 260px; overflow: hidden;
  font-family: var(--font-mono); font-size: clamp(.72rem, 1.6vw, .82rem); line-height: 1.55;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(32px); -webkit-backdrop-filter: blur(32px);
}
.terminal__history { display: grid; gap: .35rem; }
.terminal__line { color: var(--text-soft); word-break: break-word; }
.terminal__line--cmd { color: var(--text); }
.terminal__line--cmd .terminal__prompt { color: var(--cyan); margin-right: .45rem; }
.terminal__line--success { color: #34d399; }
.terminal__line--info { color: #93c5fd; }
.terminal__line--warn { color: #fbbf24; }
.terminal__line--json { color: #c4b5fd; white-space: pre-wrap; }
.terminal__input-line { display: flex; align-items: center; margin-top: .5rem; color: var(--text); }
.terminal__prompt { color: var(--cyan); margin-right: .45rem; flex-shrink: 0; }
.terminal__cmd { color: var(--text); min-height: 1.2em; }
.terminal__caret { color: var(--cyan); animation: blink 1s step-end infinite; margin-left: 1px; }

/* Profile photo — compact right column */
.hero__photo-card {
  position: relative; width: min(100%, 300px); aspect-ratio: 1;
  display: grid; place-items: center;
}
.hero__photo {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  border-radius: 50%; border: 2px solid rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 20px 50px rgba(0,0,0,.45);
  position: relative; z-index: 2;
}
.hero__photo-glow {
  position: absolute; inset: -12%;
  background: radial-gradient(circle, rgba(10,132,255,.35), rgba(94,92,230,.2), transparent 70%);
  filter: blur(40px); opacity: .5; z-index: 1; border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}
.hero__badge {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: .45rem;
  padding: .5rem .85rem; border-radius: 100px; font-size: .78rem; font-weight: 600; color: var(--text);
}
.hero__badge i { color: #34d399; }
.hero__badge--open {
  bottom: 4%; left: 50%; transform: translateX(-50%);
  background: rgba(52, 211, 153, .15); border-color: rgba(52, 211, 153, .35);
  white-space: nowrap;
}
.hero__chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; width: 100%; max-width: 300px; }
.hero__chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .75rem;
  border-radius: 100px; font-size: .75rem; font-weight: 600; color: var(--text-soft);
}
.hero__chip i { color: var(--primary); font-size: .7rem; }

.hero__scroll { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2; width: 26px; height: 42px; border: 2px solid var(--border-strong); border-radius: 100px; display: grid; justify-items: center; padding-top: 7px; }
.hero__scroll-wheel { width: 4px; height: 8px; background: var(--cyan); border-radius: 2px; animation: scrollWheel 1.8s infinite; }

/* --- About --- */
.about__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; }
.about__lead { padding: clamp(1.5rem, 3vw, 2.4rem); }
.about__lead p { color: var(--text-soft); margin-bottom: 1rem; }
.about__highlights { display: grid; gap: .6rem; margin-top: 1.4rem; }
.about__highlights li { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 500; }
.about__highlights i { color: var(--cyan); font-size: .85rem; }
.about__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-content: start; }
.about__mini { padding: 1.4rem; transition: transform .35s var(--ease), border-color .35s var(--ease); }
.about__mini:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.about__mini-icon { font-size: 1.5rem; color: var(--primary); margin-bottom: .7rem; }
.about__mini h3 { font-size: 1rem; margin-bottom: .25rem; }
.about__mini p { color: var(--text-soft); font-size: .9rem; }

/* --- Skills --- */
.skills__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.3rem; }
.skills__cat { padding: 1.6rem; transition: transform .35s var(--ease), border-color .35s var(--ease); }
.skills__cat:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.skills__cat-title { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; margin-bottom: 1.3rem; }
.skills__cat-title i { color: var(--primary); }
.skills__bars { display: grid; gap: 1rem; }
.skill__name { display: flex; justify-content: space-between; font-size: .9rem; color: var(--text-soft); margin-bottom: .4rem; }
.skill { position: relative; }
.skill__pct { color: var(--text); font-family: var(--font-mono); }
.skill__track { height: 8px; border-radius: 100px; background: var(--surface-2); overflow: hidden; }
.skill__fill { display: block; height: 100%; width: 0; border-radius: 100px; background: var(--grad); transition: width 1.2s var(--ease); }

/* --- Timeline --- */
.timeline { position: relative; max-width: 820px; margin-inline: auto; padding-left: 2rem; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--primary), var(--cyan)); opacity: .4; }
.timeline__item { position: relative; margin-bottom: 1.6rem; }
.timeline__dot { position: absolute; left: -2rem; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--primary); box-shadow: 0 0 0 4px rgba(109,94,252,.15); }
.timeline__card { padding: 1.6rem; transition: transform .35s var(--ease), border-color .35s var(--ease); }
.timeline__card:hover { transform: translateX(6px); border-color: var(--primary); }
.timeline__date { font-family: var(--font-mono); font-size: .78rem; color: var(--cyan); }
.timeline__role { font-size: 1.2rem; margin-top: .3rem; }
.timeline__company { color: var(--primary-2); font-weight: 600; margin-bottom: .6rem; }
.timeline__card p { color: var(--text-soft); font-size: .95rem; }

/* --- Projects --- */
.projects__filters { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 2.5rem; }
.projects__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.4rem; }
.project { overflow: hidden; padding: 0; transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease); }
.project.is-hidden { display: none; }
.project.is-filtering { animation: fadeUp .5s var(--ease); }
.project:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-glow); }
.project__media { aspect-ratio: 16/10; overflow: hidden; position: relative; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project:hover .project__media img { transform: scale(1.08); }
.project__body { padding: 1.4rem; }
.project__title { font-size: 1.2rem; margin-bottom: .4rem; }
.project__desc { color: var(--text-soft); font-size: .92rem; }
.project__links { display: flex; gap: .6rem; margin-top: 1.2rem; }

/* --- Marquee --- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); padding-block: 1rem; }
.marquee__track { display: flex; gap: 2.5rem; width: max-content; animation: marquee 28s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { display: inline-flex; align-items: center; gap: .7rem; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--text-soft); }
.marquee__item i { font-size: 1.7rem; color: var(--primary); }

/* --- Services --- */
.services__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.3rem; }
.service { padding: 1.8rem; transition: transform .35s var(--ease), border-color .35s var(--ease); position: relative; overflow: hidden; }
.service::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: opacity .35s var(--ease); }
.service:hover { transform: translateY(-6px); border-color: var(--primary); }
.service:hover::before { opacity: 1; }
.service > * { position: relative; z-index: 1; }
.service__icon { font-size: 1.9rem; color: var(--primary); margin-bottom: 1rem; }
.service h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.service p { color: var(--text-soft); font-size: .92rem; }

/* --- Testimonials --- */
.carousel { max-width: 760px; margin-inline: auto; }
.carousel__viewport { overflow: hidden; }
.carousel__track { display: flex; transition: transform .6s var(--ease); }
.carousel__slide { min-width: 100%; padding: .4rem; }
.testimonial { padding: 2.2rem; text-align: center; }
.testimonial__quote { font-size: 1.6rem; color: var(--primary); margin-bottom: 1rem; }
.testimonial p { color: var(--text); font-size: 1.1rem; font-style: italic; }
.testimonial__author { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: 1.4rem; }
.testimonial__author img { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--border-strong); }
.testimonial__author div { text-align: left; }
.testimonial__author span { display: block; color: var(--text-mute); font-size: .85rem; }
.carousel__controls { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-top: 1.6rem; }
.carousel__dots { display: flex; gap: .5rem; }
.carousel__dots button { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); transition: all .3s var(--ease); }
.carousel__dots button.is-active { background: var(--grad); width: 26px; border-radius: 100px; }

/* --- Stats --- */
.stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.3rem; }
.stat { padding: 1.8rem; text-align: center; transition: transform .35s var(--ease), border-color .35s var(--ease); }
.stat:hover { transform: translateY(-5px); border-color: var(--primary); }
.stat__num { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat__label { display: block; color: var(--text-soft); margin-top: .4rem; font-size: .92rem; }

/* --- Contact --- */
.contact__grid { display: grid; grid-template-columns: 1.3fr .8fr; gap: 1.5rem; }
.contact__form { padding: clamp(1.5rem, 3vw, 2.4rem); display: grid; gap: 1.2rem; }
.field { display: grid; gap: .45rem; }
.field label { font-size: .88rem; font-weight: 600; color: var(--text-soft); }
.field input, .field textarea {
  padding: .85rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
  resize: vertical;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 3px rgba(10,132,255,.15);
}
.field.is-invalid input, .field.is-invalid textarea { border-color: #f87171; }
.field__error { color: #f87171; font-size: .8rem; min-height: 1em; }
.contact__status { text-align: center; font-size: .9rem; min-height: 1.2em; }
.contact__info { display: grid; gap: 1rem; align-content: start; }
.contact__item { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; transition: transform .3s var(--ease), border-color .3s var(--ease); }
.contact__item:hover { transform: translateY(-3px); border-color: var(--primary); }
.contact__item i { font-size: 1.2rem; color: var(--primary); width: 26px; text-align: center; }
.contact__item span { display: block; color: var(--text-mute); font-size: .78rem; }
.contact__item strong { font-size: .98rem; }
.contact__socials { display: flex; gap: .7rem; margin-top: .4rem; }
.contact__socials a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); transition: all .3s var(--ease); }
.contact__socials a:hover { color: #fff; background: var(--grad); border-color: transparent; transform: translateY(-3px); }

/* --- Footer --- */
.footer { border-top: 1px solid var(--border); padding-top: 3rem; margin-top: 2rem; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; }
.footer__brand p { color: var(--text-soft); margin-top: .6rem; max-width: 30ch; font-size: .92rem; }
.footer__links { display: grid; gap: .6rem; align-content: start; }
.footer__links a { color: var(--text-soft); font-size: .92rem; transition: color .25s var(--ease); }
.footer__links a:hover { color: var(--text); }
.footer__socials { display: flex; gap: .8rem; height: max-content; font-size: 1.2rem; color: var(--text-mute); }
.footer__socials a:hover { color: var(--text); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem; padding-block: 1.5rem; border-top: 1px solid var(--border); color: var(--text-mute); font-size: .85rem; }
.footer__credit i { color: #f87171; }

/* ============ 6. PREMIUM FEATURES ============ */
/* loader */
.loader { position: fixed; inset: 0; z-index: 9999; background: var(--bg); display: grid; place-items: center; transition: opacity .6s var(--ease), visibility .6s; }
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__inner { display: grid; justify-items: center; gap: 1.2rem; }
.loader__logo { font-family: var(--font-display); font-weight: 800; font-size: 2.5rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: pulse 1.6s ease-in-out infinite; }
.loader__bar { width: 200px; height: 4px; border-radius: 100px; background: var(--surface-2); overflow: hidden; }
.loader__bar-fill { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s linear; }
.loader__pct { font-family: var(--font-mono); color: var(--text-mute); font-size: .85rem; }

/* custom cursor */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; border-radius: 50%; pointer-events: none; z-index: 9998; transform: translate(-50%, -50%); }
.cursor { width: 34px; height: 34px; border: 1.5px solid var(--primary); transition: width .25s var(--ease), height .25s var(--ease), background .25s var(--ease); }
.cursor.is-hover { width: 54px; height: 54px; background: rgba(109, 94, 252, .12); border-color: var(--cyan); }
.cursor-dot { width: 6px; height: 6px; background: var(--cyan); }
@media (hover: none) { .cursor, .cursor-dot { display: none; } }

/* scroll progress */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad); z-index: 200; transition: width .1s linear; }

/* background blobs + grid */
.bg-blobs { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(120px); opacity: .22; }
.blob--1 { width: 520px; height: 520px; background: #0a84ff; top: -140px; left: -120px; animation: drift 28s ease-in-out infinite; }
.blob--2 { width: 460px; height: 460px; background: #5e5ce6; bottom: -140px; right: -100px; animation: drift 32s ease-in-out infinite reverse; }
.blob--3 { width: 380px; height: 380px; background: #bf5af2; top: 42%; left: 52%; animation: drift 36s ease-in-out infinite; opacity: .14; }
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000, transparent 75%);
  mask-image: radial-gradient(circle at 50% 30%, #000, transparent 75%);
  opacity: .12;
}

/* floating social bar */
.floating-social { position: fixed; left: 1.4rem; bottom: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 1rem; color: var(--text-mute); font-size: 1.15rem; }
.floating-social a { transition: color .25s var(--ease), transform .25s var(--ease); }
.floating-social a:hover { color: var(--text); transform: translateY(-3px); }
.floating-social__line { width: 1px; height: 70px; background: var(--border-strong); }
@media (max-width: 1100px) { .floating-social { display: none; } }

/* back to top */
.to-top {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 95; width: 48px; height: 48px;
  border-radius: var(--radius-sm); background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 24px rgba(10,132,255,.35);
  opacity: 0; visibility: hidden; transform: translateY(20px); transition: all .35s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-4px); }

/* command palette */
.palette { position: fixed; inset: 0; z-index: 500; display: grid; place-items: start center; padding-top: 12vh; }
.palette[hidden] { display: none; }
.palette__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); animation: fadeIn .25s var(--ease); }
.palette__panel { position: relative; width: min(560px, 92vw); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-glow); animation: fadeUp .3s var(--ease); }
.palette__search { display: flex; align-items: center; gap: .8rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--border); }
.palette__search i { color: var(--text-mute); }
.palette__search input { flex: 1; background: none; border: none; outline: none; font-size: 1rem; }
.palette__search kbd { font-family: var(--font-mono); font-size: .7rem; padding: .2rem .5rem; border: 1px solid var(--border); border-radius: 6px; color: var(--text-mute); }
.palette__list { max-height: 320px; overflow-y: auto; padding: .5rem; }
.palette__item { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-radius: 12px; color: var(--text-soft); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.palette__item i { width: 22px; text-align: center; color: var(--primary); }
.palette__item.is-active, .palette__item:hover { background: var(--surface-2); color: var(--text); }
.palette__item small { margin-left: auto; color: var(--text-mute); font-family: var(--font-mono); font-size: .72rem; }
.palette__empty { padding: 1.4rem; text-align: center; color: var(--text-mute); }

/* toast */
.toast { position: fixed; bottom: 1.6rem; left: 50%; transform: translate(-50%, 30px); z-index: 600; background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text); padding: .9rem 1.4rem; border-radius: 14px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: all .35s var(--ease); font-size: .92rem; }
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ============ 7. ANIMATIONS ============ */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); } 50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(40px, -30px) scale(1.1); } 66% { transform: translate(-30px, 20px) scale(.95); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes scrollWheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ============ 8. RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero__col--visual { order: -1; }
  .hero__photo-card { width: min(240px, 62vw); }
  .hero__chips { max-width: 100%; }
  .hero__eyebrow { margin-inline: auto; }
  .hero__cta, .hero__socials { justify-content: center; }
  .hero__desc { margin-inline: auto; text-align: center; }
  .hero__col--main { text-align: center; align-items: center; }
  .hero__terminal { width: 100%; text-align: left; }
  .terminal__body { min-height: 190px; max-height: 220px; }
}

@media (max-width: 960px) {
  .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(300px, 82vw); flex-direction: column; gap: .4rem;
    background: var(--bg-2); border-left: 1px solid var(--border); padding: 6rem 1.5rem 2rem;
    transform: translateX(110%); transition: transform .4s var(--ease); z-index: 99;
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__links a { font-size: 1.05rem; padding: .8rem 1rem; }
  .nav__burger { display: flex; }
  .nav__cta { display: none; }
  .about__cards { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__photo-card { width: min(200px, 58vw); }
  .terminal__title { display: none; }
  .terminal__body { min-height: 170px; max-height: 200px; font-size: .7rem; }
  .hero__title { font-size: 2rem; }
  .projects__grid, .skills__grid, .services__grid { grid-template-columns: 1fr; }
}

/* ============ 9. REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .cursor, .cursor-dot { display: none; }
}
