/* ═══════════════════════════════════════════════════════════
   HANUDEVS PORTFOLIO — style.css
   Fonts: Space Grotesk (display) + JetBrains Mono (code)
   Icons: Font Awesome 6 Free
═══════════════════════════════════════════════════════════ */

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

:root {
  --cyan:      #00f5ff;
  --purple:    #b44bff;
  --green:     #39ff7e;
  --yellow:    #ffd700;
  --bg:        #080810;
  --bg2:       #0d0d18;
  --card:      #0f0f1c;
  --card2:     #13131f;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(0,245,255,0.15);
  --text:      #e2e8f0;
  --muted:     #64748b;
  --muted2:    #94a3b8;
  --radius:    14px;
  --radius-sm: 8px;
  --mono:      'JetBrains Mono', monospace;
  --sans:      'Space Grotesk', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Noise grain */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 180px;
  pointer-events: none;
  z-index: 9000;
}

/* ── Ambient Blobs ───────────────────────────────────────── */
.blob {
  position: fixed; border-radius: 50%;
  filter: blur(140px); pointer-events: none; z-index: 0;
  will-change: transform;
}

/* ── Typography ──────────────────────────────────────────── */
.font-mono  { font-family: var(--mono); }
.grad-text  {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-cyan   { color: var(--cyan); }
.text-purple { color: var(--purple); }
.text-green  { color: var(--green); }
.text-muted  { color: var(--muted); }
.text-muted2 { color: var(--muted2); }

.sec-num { color: var(--cyan); font-family: var(--mono); font-weight: 700; }

.highlight        { color: var(--cyan);   font-weight: 700; }
.highlight-purple { color: var(--purple); font-weight: 700; }

/* ── Navigation ──────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 18px 32px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(8,8,16,0.82);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--mono); font-size: 1.15rem; font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-link {
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  text-decoration: none; transition: color .2s; position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--cyan); transition: width .25s;
}
.nav-link:hover, .nav-link.active { color: var(--cyan); }
.nav-link:hover::after { width: 100%; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  padding: 11px 26px; border-radius: var(--radius-sm);
  text-decoration: none; transition: all .25s; cursor: pointer; border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #000;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 32px rgba(0,245,255,.35); }
.btn-outline {
  border: 1px solid rgba(0,245,255,.35); color: var(--cyan);
  background: transparent;
}
.btn-outline:hover { background: rgba(0,245,255,.07); border-color: var(--cyan); }
.btn-sm { padding: 8px 18px; font-size: 12px; }

/* ── Glass Card ──────────────────────────────────────────── */
.glass-card {
  background: rgba(13,13,24,0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 40px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04);
  position: relative;
  overflow: hidden;
}

/* ── Sections ────────────────────────────────────────────── */
section { position: relative; z-index: 1; }
.section-wrap { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
.section-head { margin-bottom: 56px; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 8px; }
.section-sub {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  margin-top: 4px;
}

/* ── Hero ────────────────────────────────────────────────── */
#home {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 90px;
  text-align: center;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-pre {
  font-family: var(--mono); font-size: 13px; color: var(--cyan);
  opacity: .8; margin-bottom: 18px;
}
.hero-name {
  font-size: clamp(3.5rem, 11vw, 7rem);
  font-weight: 900; letter-spacing: -2px; line-height: 1;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 18px;
}
.hero-typer {
  font-family: var(--mono); font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--muted2); min-height: 36px;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  margin-bottom: 14px;
}
.hero-typer .tc { color: var(--cyan); animation: blink .8s step-end infinite; }
.hero-sub {
  color: var(--muted); font-size: 1rem; max-width: 520px;
  margin-bottom: 40px; line-height: 1.7;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-bottom: 72px; }
.scroll-hint { display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: .35; }
.scroll-hint span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.scroll-line {
  width: 1px; height: 54px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
}

/* ── About Section ───────────────────────────────────────── */
#about { padding: 72px 0; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}

.about-text-col {}
.about-heading { font-size: clamp(1.6rem,3.5vw,2.1rem); font-weight: 800; margin-bottom: 18px; }
.about-bio { color: var(--muted2); font-size: .92rem; line-height: 1.75; margin-bottom: 12px; }

.about-stats {
  display: flex; gap: 40px; margin-top: 24px;
}
.stat-item .stat-num {
  font-family: var(--mono); font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1;
}
.stat-item .stat-label { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 5px; }

/* ── Apple Code Window ───────────────────────────────────── */
.code-win-wrap {
  perspective: 1100px;
  width: 100%;
}
.code-window {
  background: #0b0e17;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow:
    0 40px 90px rgba(0,0,0,.75),
    0 0 0 1px rgba(255,255,255,.04),
    inset 0 1px 0 rgba(255,255,255,.06);
  transform-style: preserve-3d;
  transition: transform .08s linear, box-shadow .08s linear;
  will-change: transform;
  user-select: none;
  width: 100%;
}
.win-bar {
  display: flex; align-items: center; gap: 0;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  background: rgba(255,255,255,.02);
  border-radius: 14px 14px 0 0;
}
.win-dots { display: flex; gap: 8px; }
.win-dot { width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0; }
.win-dot.red    { background: #ff5f57; }
.win-dot.yellow { background: #febc2e; }
.win-dot.green  { background: #28c840; }
.win-filename {
  font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.25);
  margin-left: 14px;
}
.win-body {
  padding: 18px 24px 22px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
}

/* Syntax tokens */
.t-tag    { color: #ff7b72; }
.t-kw     { color: #79c0ff; }
.t-cls    { color: #ffd700; }
.t-fn     { color: #00f5ff; }
.t-prop   { color: #b44bff; }
.t-str    { color: #a5d6ff; }
.t-ret    { color: #39ff7e; }
.t-punct  { color: rgba(255,255,255,.3); }
.t-cmt    { color: rgba(255,255,255,.2); font-style: italic; }

/* Blinking cursor */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.blink { animation: blink 1s step-end infinite; color: var(--cyan); }

/* ── Tech Stack Cards ────────────────────────────────────── */
#stack { padding: 100px 0; }
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stack-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.stack-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 35px rgba(0,245,255,.1);
}
.stack-card.backend:hover  { border-color: var(--cyan); }
.stack-card.frontend:hover { border-color: var(--purple); }
.stack-card.database:hover { border-color: var(--green); }
.stack-card.tools:hover    { border-color: var(--yellow); }

.stack-icon {
  font-size: 1.6rem; margin-bottom: 14px; display: block;
}
.stack-icon.c-cyan   { color: var(--cyan); }
.stack-icon.c-purple { color: var(--purple); }
.stack-icon.c-green  { color: var(--green); }
.stack-icon.c-yellow { color: var(--yellow); }

.stack-cat {
  font-size: 14px; font-weight: 700; margin-bottom: 16px;
}
.stack-list { list-style: none; }
.stack-list li {
  font-family: var(--mono); font-size: 12px; color: var(--muted2);
  padding: 5px 0;
  display: flex; align-items: center; gap: 8px;
}
.stack-list li i { font-size: 9px; }

/* ── Projects ────────────────────────────────────────────── */
#projects { padding: 100px 0; }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.proj-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all .3s ease;
  display: flex; flex-direction: column;
}
.proj-card:hover {
  border-color: rgba(180,75,255,.4);
  transform: translateY(-6px);
  box-shadow: 0 0 45px rgba(180,75,255,.1);
}
.proj-num {
  font-family: var(--mono); font-size: 11px; color: var(--cyan);
  opacity: .4; margin-bottom: 16px;
}
.proj-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; }
.proj-desc  { color: var(--muted2); font-size: .875rem; line-height: 1.7; flex: 1; margin-bottom: 20px; }
.proj-tags  { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tag {
  font-family: var(--mono); font-size: 11px; color: var(--cyan);
  background: rgba(0,245,255,.06);
  border: 1px solid rgba(0,245,255,.18);
  border-radius: 99px; padding: 3px 12px;
}
.proj-link {
  font-family: var(--mono); font-size: 12px; color: var(--cyan);
  text-decoration: none; opacity: .6; transition: opacity .2s;
  display: flex; align-items: center; gap: 6px; margin-top: auto;
}
.proj-link:hover { opacity: 1; }

/* ── Contact ─────────────────────────────────────────────── */
#contact { padding: 100px 0; }
.contact-inner { max-width: 680px; margin: 0 auto; text-align: center; }
.contact-lead { color: var(--muted2); font-size: 1rem; max-width: 480px; margin: 0 auto 56px; }

.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px;
  text-align: left;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-family: var(--mono); font-size: 11px;
  color: var(--muted); margin-bottom: 8px;
}
.form-input {
  width: 100%; background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
  padding: 13px 16px; font-family: var(--sans); font-size: 14px;
  outline: none; transition: border-color .2s;
}
.form-input:focus { border-color: var(--cyan); }
.form-input::placeholder { color: var(--muted); }
textarea.form-input { resize: vertical; min-height: 130px; }

.form-success {
  background: rgba(57,255,126,.06);
  border: 1px solid rgba(57,255,126,.2);
  color: var(--green);
  border-radius: var(--radius-sm); padding: 14px 18px;
  font-family: var(--mono); font-size: 13px; margin-bottom: 20px;
}
.form-error {
  background: rgba(255,80,80,.06);
  border: 1px solid rgba(255,80,80,.2);
  color: #f87171;
  border-radius: var(--radius-sm); padding: 14px 18px;
  font-family: var(--mono); font-size: 13px; margin-bottom: 20px;
}

.contact-socials {
  display: flex; justify-content: center; gap: 32px; margin-top: 40px;
}
.social-link {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  text-decoration: none;
  display: flex; align-items: center; gap: 7px;
  transition: color .2s;
}
.social-link:hover { color: var(--cyan); }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  position: relative; z-index: 1;
}
.footer-text {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.footer-text span { color: var(--cyan); }

/* ── Scroll Fade-In ──────────────────────────────────────── */
.fi {
  opacity: 0; transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}
.fi.in { opacity: 1; transform: translateY(0); }
.fi-delay-1 { transition-delay: 80ms; }
.fi-delay-2 { transition-delay: 160ms; }
.fi-delay-3 { transition-delay: 240ms; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .site-nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-card { padding: 28px 22px; }
}

@media (max-width: 480px) {
  .stack-grid { grid-template-columns: 1fr 1fr; }
}