/* =====================================================
   DESIGN TOKENS
   ===================================================== */
:root {
  /* Backgrounds */
  --bg:           #08080a;
  --bg-card:      #0b0b0f;
  --bg-elevated:  #0e0e13;
  --bg-overlay:   #0a0a0e;

  /* Text */
  --text:         #f3f4f7;
  --text-muted:   #9a9aa6;
  --text-dim:     #5a5a66;
  --text-body:    #b3b3bd;
  --text-term:    #b9b9c4;

  /* Brand */
  --accent:       #5d8bff;
  --accent-light: #8fb0ff;
  --green:        #5fd08a;
  --purple:       #c77dff;
  --yellow:       #febc2e;
  --blue-mid:     #7fb4ff;

  /* Borders */
  --border:           rgba(255,255,255,0.07);
  --border-subtle:    rgba(255,255,255,0.06);
  --border-accent:    rgba(93,139,255,0.4);

  /* Fonts */
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii */
  --r-sm:  7px;
  --r-md:  9px;
  --r-lg: 13px;
  --r-xl: 15px;
}

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

html { scroll-behavior: auto; }

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

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

::selection { background: rgba(93,139,255,0.3); color: #fff; }

/* =====================================================
   SCROLLBAR
   ===================================================== */
::-webkit-scrollbar        { width: 10px; height: 10px; }
::-webkit-scrollbar-track  { background: var(--bg); }
::-webkit-scrollbar-thumb  { background: #1c1c22; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a2a33; }

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes gridMove  { from { transform: translateY(0); }    to { transform: translateY(44px); } }
@keyframes glowPulse { 0%,100% { opacity:.45; transform:scale(1); } 50% { opacity:.8; transform:scale(1.08); } }
@keyframes blink     { 0%,49% { opacity:1; } 50%,100% { opacity:0; } }
@keyframes floaty    { 0%,100% { transform:translateY(0); }  50% { transform:translateY(-16px); } }
@keyframes scan      { from { transform:translateY(-100%); } to { transform:translateY(2400%); } }

@media (prefers-reduced-motion: reduce) {
  .hero__bg-grid,
  .hero__glow,
  .hero__scan,
  .hero__token,
  .terminal__cursor { animation: none !important; }
}

/* =====================================================
   LAYOUT
   ===================================================== */
.page { position: relative; width: 100%; min-height: 100vh; }

.container         { max-width: 1080px; margin: 0 auto; }
.container--narrow { max-width: 760px; text-align: center; }

.section {
  position: relative;
  padding: 110px clamp(20px, 5vw, 56px);
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* =====================================================
   TYPOGRAPHY HELPERS
   ===================================================== */
.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 14px;
}

/* Same visual as section-label but used inside hero panels as eyebrow text */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 40px);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 540px;
  margin-bottom: 44px;
}

/* Inline color utilities used in terminal / code syntax */
.t-accent  { color: var(--accent); }
.t-dim     { color: var(--text-dim); }
.t-text    { color: var(--text); }
.t-term    { color: var(--text-term); }
.t-green   { color: var(--green); }
.t-purple  { color: var(--purple); }
.t-blue    { color: var(--blue-mid); }
.t-yellow  { color: var(--yellow); }

/* =====================================================
   NAVIGATION
   ===================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 56px);
  background: rgba(8,8,10,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav__logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.3px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
}

.nav__logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(93,139,255,0.5);
  border-radius: 6px;
  color: var(--accent);
  font-size: 13px;
  background: rgba(93,139,255,0.1);
}

.nav__logo-dot { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
}

.nav__link {
  padding: 8px 13px;
  font-size: 12.5px;
  letter-spacing: 0.2px;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s;
}

.nav__link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.nav__cta {
  margin-left: 6px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #0a0a0c;
  border-radius: 8px;
  background: var(--accent);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0 1px rgba(93,139,255,0.4), 0 8px 24px -8px rgba(93,139,255,0.6);
}

.nav__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(93,139,255,0.6), 0 12px 30px -8px rgba(93,139,255,0.8);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 13px 24px;
  border-radius: var(--r-md);
  transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.btn--primary {
  font-weight: 600;
  background: var(--accent);
  color: #0a0a0c;
  box-shadow: 0 12px 30px -10px rgba(93,139,255,0.7);
}

.btn--primary:hover { transform: translateY(-2px); }

.btn--secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.14);
}

.btn--secondary:hover {
  border-color: rgba(93,139,255,0.5);
  background: rgba(93,139,255,0.06);
}

.btn--lg {
  font-size: 14px;
  padding: 15px 30px;
  border-radius: 10px;
}

.btn--lg.btn--primary { box-shadow: 0 16px 40px -12px rgba(93,139,255,0.8); }

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 108px clamp(20px, 5vw, 56px) 56px;
  overflow: hidden;
}

/* Animated grid background */
.hero__bg-grid {
  position: absolute;
  inset: -2px;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: gridMove 6s linear infinite;
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 42%, #000 30%, transparent 78%);
          mask-image: radial-gradient(ellipse 80% 65% at 50% 42%, #000 30%, transparent 78%);
}

/* Glow orb */
.hero__glow {
  position: absolute;
  top: 18%; left: 50%;
  transform: translateX(-50%);
  width: 680px; height: 520px;
  z-index: 0;
  background: radial-gradient(circle, rgba(93,139,255,0.22), transparent 62%);
  filter: blur(20px);
  animation: glowPulse 7s ease-in-out infinite;
  pointer-events: none;
}

/* Scanline */
.hero__scan {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(93,139,255,0.5), transparent);
  animation: scan 9s linear infinite;
  opacity: 0.5;
  pointer-events: none;
}

/* Panel switcher pills */
.hero__switcher {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.hero-pill {
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.hero-pill--active {
  color: var(--accent);
  background: rgba(93,139,255,0.12);
  border-color: rgba(93,139,255,0.5);
}

/* Each hero panel */
.hero-panel {
  position: relative;
  z-index: 4;
  width: 100%;
}

.hero-panel--hidden { display: none; }

/* Panel 1 & 2 are centered with a max-width */
[data-hero-panel="1"] { max-width: 760px;  margin: 0 auto; }
[data-hero-panel="2"] { max-width: 980px;  margin: 0 auto; text-align: center; }
[data-hero-panel="3"] { max-width: 1080px; margin: 0 auto; }

/* CTA button row */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero__actions--center {
  justify-content: center;
  margin-top: 34px;
}

/* ---- Panel 2: Statement ---- */
.hero__statement-name {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(48px, 11vw, 140px);
  line-height: 0.92;
  letter-spacing: -3px;
  margin-top: 18px;
  color: var(--text);
}

.hero__statement-text {
  max-width: 560px;
  margin: 26px auto 0;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.7;
  color: var(--text-muted);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  padding: 8px 16px;
  border: 1px solid rgba(95,208,138,0.3);
  border-radius: 999px;
  background: rgba(95,208,138,0.07);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
}

.hero__badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

/* Floating code tokens */
.hero__token {
  position: absolute;
  font-family: var(--font-mono);
}

.hero__token--1 { left: -2%;  top: 14%;    font-size: 15px; color: rgba(93,139,255,0.5);  animation: floaty 5.0s ease-in-out infinite; }
.hero__token--2 { right: 1%;  top: 8%;     font-size: 14px; color: rgba(255,255,255,0.18); animation: floaty 6.5s ease-in-out infinite; }
.hero__token--3 { left: 6%;   bottom: 8%;  font-size: 14px; color: rgba(255,255,255,0.16); animation: floaty 5.8s ease-in-out infinite; }
.hero__token--4 { right: 4%;  bottom: 18%; font-size: 15px; color: rgba(93,139,255,0.45);  animation: floaty 4.8s ease-in-out infinite; }

/* ---- Panel 3: Split ---- */
.hero__split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero__split-name {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -2px;
  margin-top: 16px;
}

.hero__split-desc {
  max-width: 460px;
  margin-top: 22px;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* =====================================================
   TERMINAL CARD
   ===================================================== */
.terminal {
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #0e0e13, #0a0a0e);
  box-shadow:
    0 30px 80px -30px rgba(0,0,0,0.9),
    0 0 0 1px rgba(93,139,255,0.06),
    0 0 60px -20px rgba(93,139,255,0.25);
  overflow: hidden;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.015);
}

.terminal__dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal__dot--red    { background: #ff5f57; }
.terminal__dot--yellow { background: #febc2e; }
.terminal__dot--green  { background: #28c840; }

.terminal__title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.terminal__body {
  padding: 26px 26px 30px;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.6vw, 15.5px);
  line-height: 2.05;
}

.terminal__body-gap   { margin-top: 6px; }
.terminal__body-caret { margin-top: 8px; }

.terminal__cursor {
  display: inline-block;
  width: 9px; height: 17px;
  background: var(--accent);
  vertical-align: -3px;
  animation: blink 1.05s step-end infinite;
}

.terminal__code {
  margin: 0;
  padding: 22px 22px 26px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--text-term);
  overflow: auto;
  white-space: pre;
}

/* =====================================================
   ABOUT SECTION
   ===================================================== */
.about__grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 56px;
  align-items: start;
}

.about__portrait-wrap { position: relative; }

.about__portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
}

/* Accent ring overlay on the portrait */
.about__portrait-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(93,139,255,0.18), 0 30px 60px -30px rgba(93,139,255,0.4);
  pointer-events: none;
}

.about__title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.about__text {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-body);
  margin-top: 22px;
}

.about__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 34px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
}

.meta-item { padding: 18px 20px; background: var(--bg-card); }

.meta-item__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.meta-item__value {
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: var(--text);
  margin-top: 7px;
}

.meta-item__value--green { color: var(--green); }

/* =====================================================
   SKILLS SECTION
   ===================================================== */
.skills {
  background: linear-gradient(180deg, var(--bg), #0a0a0e, var(--bg));
}

.skill-bars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px 48px;
  margin-bottom: 52px;
}

.skill-bar__header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 9px;
}

.skill-bar__track {
  height: 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.skill-bar__fill {
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transition: width 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
  box-shadow: 0 0 14px rgba(93,139,255,0.6);
}

.skill-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.skill-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  transition: border-color 0.25s, transform 0.25s;
}

.skill-card:hover {
  border-color: rgba(93,139,255,0.35);
  transform: translateY(-4px);
}

.skill-card__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.tags { display: flex; flex-wrap: wrap; gap: 7px; }

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #c5c5cf;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 7px;
  background: rgba(255,255,255,0.02);
}

/* =====================================================
   WORK / PROJECTS SECTION
   ===================================================== */
.projects { display: flex; flex-direction: column; gap: 22px; }

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.project:hover {
  border-color: rgba(93,139,255,0.4);
  transform: translateY(-4px);
  box-shadow: 0 30px 70px -40px rgba(93,139,255,0.6);
}

/* In the reversed variant the content column comes first in DOM */
.project--reversed .project__content { order: -1; }

.project__screenshot {
  position: relative;
  min-height: 260px;
  background: rgba(255,255,255,0.025);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project__screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project__placeholder {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.project__carousel { overflow: hidden; cursor: default; }

.carousel__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(.25,.8,.25,1);
}

.carousel__img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(8,8,10,0.72);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  z-index: 2;
}

.carousel__btn:hover {
  background: rgba(93,139,255,0.18);
  border-color: var(--accent);
}

.carousel__btn--prev { left: 10px; }
.carousel__btn--next { right: 10px; }

.carousel__counter {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(8,8,10,0.68);
  padding: 3px 9px;
  border-radius: 20px;
  z-index: 2;
  pointer-events: none;
}

.project__content {
  padding: 34px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.project__title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 25px;
  margin-top: 10px;
  letter-spacing: -0.5px;
}

.project__desc {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-top: 12px;
}

.project__content .tags { margin-top: 20px; }
.project__content .tag  { font-size: 11.5px; color: #8a8a96; }

.project__links {
  display: flex;
  gap: 18px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.project__link {
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 2px;
  color: #c5c5cf;
  transition: border-color 0.2s;
}

.project__link:hover { border-color: #fff; }

.project__link--accent {
  color: var(--accent);
  border-bottom-color: rgba(93,139,255,0.3);
}

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

/* =====================================================
   CONTACT / CTA SECTION
   ===================================================== */
.cta-section { overflow: hidden; }

.cta-section__glow {
  position: absolute;
  top: -40%; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(circle, rgba(93,139,255,0.16), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

.cta-section__title {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -2px;
  margin-top: 18px;
}

.cta-section__text {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
  margin: 22px auto 0;
  max-width: 480px;
}

.social-links {
  display: flex;
  gap: 26px;
  justify-content: center;
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.social-link { color: var(--text-muted); transition: color 0.2s; }
.social-link:hover { color: var(--accent); }

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 30px clamp(20px, 5vw, 56px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .skill-cards  { grid-template-columns: repeat(2, 1fr); }
  .hero__split  { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .nav__link { padding: 8px 9px; font-size: 11.5px; }

  .about__grid { grid-template-columns: 1fr; gap: 36px; }
  .about__portrait-wrap { max-width: 260px; margin: 0 auto; }
  .about__portrait { max-width: 100%; }

  .skill-bars { grid-template-columns: 1fr; }
  .skill-cards { grid-template-columns: repeat(2, 1fr); }

  .project { grid-template-columns: 1fr; }
  .project--reversed .project__content { order: 0; }
  .project__screenshot { min-height: 200px; }

  .social-links { flex-direction: column; align-items: center; gap: 14px; }
}

@media (max-width: 480px) {
  /* Hide text nav links on very small screens, keep CTA */
  .nav__link { display: none; }

  .skill-cards  { grid-template-columns: 1fr; }
  .hero__token  { display: none; }
}
