/* =============================================================
   PORTFOLIO STYLESHEET
   Organized into: Tokens -> Reset -> Utilities -> Components ->
   Sections -> Animations -> Responsive.
   Search for "EDIT ME" for the spots you're most likely to tweak.
============================================================= */

/* -------------------------------------------------------------
   1. DESIGN TOKENS
   EDIT ME: change --c-cyan / --c-purple to re-theme the whole
   site (e.g. swap for a different neon pair).
------------------------------------------------------------- */
:root {
  /* Surfaces */
  --c-bg: #090c11;
  --c-bg-soft: #0d1119;
  --c-surface: #11161f;
  --c-surface-2: #171d29;
  --c-border: #232b3a;
  --c-border-soft: #1a212e;

  /* Text */
  --c-text: #e7ecf3;
  --c-text-dim: #8996a8;
  --c-text-faint: #4f5b70;

  /* Accents */
  --c-cyan: #4cf5e8;
  --c-purple: #b478ff;
  --c-green: #5eeb8f;
  --c-red: #ff6b6b;
  --c-yellow: #f5c451;

  /* Gradients */
  --grad-accent: linear-gradient(120deg, var(--c-cyan), var(--c-purple));

  /* Type */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --nav-height: 76px;
  --max-width: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.2s;
  --dur-med: 0.45s;
}

/* -------------------------------------------------------------
   2. RESET & BASE
------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

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

/* Faint ambient glow behind the whole page, dev-console vibe */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 40vh at 12% 0%, rgba(76, 245, 232, 0.07), transparent 60%),
    radial-gradient(50vw 40vh at 88% 20%, rgba(180, 120, 255, 0.07), transparent 60%);
  pointer-events: none;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

ul { list-style: none; margin: 0; padding: 0; }

img { max-width: 100%; display: block; }

button { font: inherit; cursor: pointer; }

/* Accessible, visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Thin, themed scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb {
  background: var(--c-border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--c-cyan); }
html { scrollbar-color: var(--c-border) var(--c-bg); scrollbar-width: thin; }

/* -------------------------------------------------------------
   3. UTILITIES
------------------------------------------------------------- */
.accent-cyan { color: var(--c-cyan); }
.accent-purple { color: var(--c-purple); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--c-cyan);
  letter-spacing: 0.04em;
  margin: 0 0 0.9rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6.5rem 2rem;
}

.section-inner--narrow { max-width: 700px; text-align: center; }

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  color: var(--c-text-dim);
  max-width: 560px;
  font-size: 1.05rem;
  margin-bottom: 3rem;
}

.section-inner--narrow .section-subtitle { margin-left: auto; margin-right: auto; }

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 0 4px rgba(94, 235, 143, 0.15);
  margin-right: 0.6rem;
}
.status-dot--sm { margin-right: 0.4rem; }

.cursor-blink {
  animation: blink 1.1s steps(1) infinite;
  color: var(--c-cyan);
}

/* -------------------------------------------------------------
   4. BUTTONS
------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}

.btn__icon { width: 1em; height: 1em; }

.btn--primary {
  background: var(--grad-accent);
  color: #05070a;
  font-weight: 600;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px rgba(76, 245, 232, 0.45);
}

.btn--ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn--ghost:hover {
  border-color: var(--c-cyan);
  color: var(--c-cyan);
  transform: translateY(-2px);
}

.btn--sm { padding: 0.6rem 1.1rem; font-size: 0.82rem; }
.btn--lg { padding: 1rem 2rem; font-size: 1rem; }

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  color: var(--c-text-dim);
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.icon-link svg { width: 18px; height: 18px; }
.icon-link:hover {
  color: var(--c-cyan);
  border-color: var(--c-cyan);
  transform: translateY(-2px);
}

/* -------------------------------------------------------------
   5. CODE WINDOW (shared "IDE" chrome used in hero / about /
   project cards - this is the site's signature visual motif)
------------------------------------------------------------- */
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--red { background: var(--c-red); }
.dot--yellow { background: var(--c-yellow); }
.dot--green { background: var(--c-green); }

.code-window {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.6);
}

.code-window__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-border);
}

.code-window__filename {
  margin-left: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-text-faint);
}

.code-window__body {
  margin: 0;
  padding: 1.4rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--c-text-dim);
  overflow-x: auto;
}

/* NOTE: no display:block here - the markup already has a real newline
   after each line inside the <pre>, so block-level spans would double
   the line spacing. */
.tok-kw { color: var(--c-purple); }
.tok-var { color: var(--c-text); }
.tok-str { color: var(--c-cyan); }
.tok-fn { color: var(--c-green); }
.tok-key { color: #f0a6d0; }

.code-window--float {
  animation: float 5s ease-in-out infinite;
}

/* -------------------------------------------------------------
   6. SCROLL REVEAL
------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------------
   7. INTRO / BOOT LOADER
------------------------------------------------------------- */
.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: var(--c-bg);
  transition: opacity 0.6s var(--ease-out), visibility 0.6s var(--ease-out);
}

.intro-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-loader__window {
  width: min(90vw, 520px);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(76, 245, 232, 0.15);
}

.intro-loader__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-border);
}

.intro-loader__filename {
  margin-left: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-text-faint);
}

.intro-loader__body {
  margin: 0;
  min-height: 180px;
  padding: 1.4rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--c-text-dim);
  white-space: pre-wrap;
  word-break: break-word;
}

.intro-loader__skip {
  background: none;
  border: none;
  color: var(--c-text-faint);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  transition: color var(--dur-fast) var(--ease-out);
}
.intro-loader__skip:hover { color: var(--c-cyan); }

/* -------------------------------------------------------------
   8. NAV
------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(9, 12, 17, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-med) var(--ease-out), background var(--dur-med) var(--ease-out);
}

.nav.is-scrolled {
  border-bottom-color: var(--c-border-soft);
  background: rgba(9, 12, 17, 0.85);
}

.nav__inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav__link {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--c-text-dim);
  position: relative;
  padding: 0.3rem 0;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--grad-accent);
  transition: width var(--dur-fast) var(--ease-out);
}
.nav__link:hover { color: var(--c-text); }
.nav__link:hover::after { width: 100%; }
.nav__link.is-active { color: var(--c-cyan); }

.nav__link--ghost-btn {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  color: var(--c-text);
}
.nav__link--ghost-btn:hover {
  border-color: var(--c-cyan);
  color: var(--c-cyan);
}
.nav__link--ghost-btn::after { display: none; }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
.nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--c-text);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------------------
   9. HERO
------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
}

.hero__inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero__name {
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  line-height: 1.05;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.75rem;
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  color: var(--c-text);
  margin-bottom: 1.25rem;
}

.hero__subtext {
  color: var(--c-text-dim);
  max-width: 480px;
  margin-bottom: 1.5rem;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--c-text-dim);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero__socials {
  display: flex;
  gap: 0.75rem;
}

.hero__visual { perspective: 1000px; }

.hero__scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--c-border);
  border-radius: 20px;
}
.hero__scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--c-cyan);
  border-radius: 2px;
  animation: scroll-cue 1.8s ease-in-out infinite;
}

/* -------------------------------------------------------------
   10. ABOUT
------------------------------------------------------------- */
.about { background: var(--c-bg-soft); border-top: 1px solid var(--c-border-soft); border-bottom: 1px solid var(--c-border-soft); }

.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: start;
  margin-top: 2.5rem;
}

.about__text p { color: var(--c-text-dim); }

.about__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--c-border-soft);
}

.about__meta-item { display: flex; flex-direction: column; gap: 0.35rem; }

.about__meta-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-faint);
}

.about__meta-value {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

/* -------------------------------------------------------------
   11. PROJECTS
------------------------------------------------------------- */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.project-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-med) var(--ease-out),
              border-color var(--dur-med) var(--ease-out),
              box-shadow var(--dur-med) var(--ease-out);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(76, 245, 232, 0.4);
  box-shadow: 0 25px 50px -20px rgba(76, 245, 232, 0.25);
}

.project-card__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 1rem;
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-border);
}

.project-card__body { padding: 1.5rem; flex: 1; }

.project-card__title {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  transition: color var(--dur-fast) var(--ease-out);
}
.project-card:hover .project-card__title { color: var(--c-cyan); }

.project-card__desc {
  color: var(--c-text-dim);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.project-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-card__stack li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--c-purple);
  background: rgba(180, 120, 255, 0.1);
  border: 1px solid rgba(180, 120, 255, 0.25);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.project-card__footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--c-border-soft);
}

/* -------------------------------------------------------------
   12. CONTACT
------------------------------------------------------------- */
.contact__socials {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* -------------------------------------------------------------
   13. FOOTER
------------------------------------------------------------- */
.footer { border-top: 1px solid var(--c-border-soft); }

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--c-text-faint);
}

/* -------------------------------------------------------------
   14. KEYFRAMES
------------------------------------------------------------- */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes scroll-cue {
  0% { opacity: 0; transform: translate(-50%, 0); }
  30% { opacity: 1; }
  60% { opacity: 0; transform: translate(-50%, 14px); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}

/* -------------------------------------------------------------
   15. RESPONSIVE
------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; max-width: 480px; }
  .about__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(9, 12, 17, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--c-border-soft);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), visibility var(--dur-fast);
  }
  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav__links .nav__link {
    width: 100%;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--c-border-soft);
  }
  .nav__link--ghost-btn { border: none; border-radius: 0; }
  .nav__toggle { display: flex; }

  .section-inner { padding: 4.5rem 1.5rem; }
  .hero__inner { padding: 2.5rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
  .about__meta { flex-direction: column; gap: 1rem; }
}

/* -------------------------------------------------------------
   16. REDUCED MOTION
------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
}
