/* ============================================================
   Portfolio — styles.css
   Design: dark theme, large bold typography, negative space
   ============================================================ */

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

:root {
  --bg:        #080808;
  --surface:   #111111;
  --border:    #1e1e1e;
  --accent:    #00ff87;
  --accent-dim:#00cc6a;
  --text:      #f0f0f0;
  --muted:     #555555;
  --font-sans: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Typography scale ─────────────────────────────────────── */
h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

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

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 3px; }

/* ── Nav ──────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 4rem;
  background: transparent;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

nav.scrolled {
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s;
}

.nav-links a:hover { color: var(--text); }

/* ── Section wrapper ──────────────────────────────────────── */
section {
  padding: 10rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}

/* ── Hero ─────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8rem;
  padding-bottom: 6rem;
  position: relative;
  overflow: hidden;
}

/* subtle grid background */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,255,135,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,135,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* radial glow */
#hero::after {
  content: '';
  position: absolute;
  top: 10%;
  right: -15%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,135,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s var(--ease) forwards;
}

.hero-headline {
  font-size: clamp(3.5rem, 9vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--text);
  opacity: 0;
  animation: fadeUp 0.9s 0.35s var(--ease) forwards;
}

.hero-headline .accent { color: var(--accent); }

.hero-sub {
  margin-top: 3rem;
  max-width: 500px;
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.9s 0.5s var(--ease) forwards;
}

.hero-cta {
  margin-top: 3.5rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s 0.65s var(--ease) forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
  cursor: pointer;
  border: none;
}

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

.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 30px rgba(0,255,135,0.3);
}

.btn-primary:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 50px rgba(0,255,135,0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fadeIn 1s 1.2s var(--ease) forwards;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ── About ────────────────────────────────────────────────── */
#about {
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.about-headline {
  font-size: clamp(2.5rem, 5vw, 5rem);
  color: var(--text);
}

.about-body {
  padding-top: 0.5rem;
}

.about-body p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.about-body p strong {
  color: var(--text);
  font-weight: 700;
}

.stats-row {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.stat-item .stat-num {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}

.stat-item .stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ── Skills ───────────────────────────────────────────────── */
#skills {
  border-top: 1px solid var(--border);
}

.skills-headline {
  font-size: clamp(2.5rem, 5vw, 5rem);
  margin-bottom: 5rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5px;
  background: var(--border);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.skill-card {
  background: var(--surface);
  padding: 2.5rem;
  transition: background 0.3s var(--ease);
}

.skill-card:hover { background: #161616; }

.skill-icon {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  display: block;
}


.skill-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
}

.skill-card:hover .tag {
  border-color: rgba(0,255,135,0.25);
  color: var(--accent);
}

/* ── Projects ─────────────────────────────────────────────── */
#projects {
  border-top: 1px solid var(--border);
}

.projects-headline {
  font-size: clamp(2.5rem, 5vw, 5rem);
  margin-bottom: 5rem;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: padding 0.3s var(--ease);
  text-decoration: none;
  color: inherit;
}

.project-row:first-child { border-top: 1px solid var(--border); }

.project-row:hover { padding-left: 1rem; }

.project-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-family: var(--font-mono);
}

.project-row:hover .project-num { color: var(--accent); }

.project-title {
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  transition: color 0.2s;
}

.project-row:hover .project-title { color: var(--accent); }

.project-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.4rem;
  line-height: 1.5;
}

.project-tech {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.project-arrow {
  font-size: 1.5rem;
  color: var(--muted);
  transition: color 0.2s, transform 0.3s var(--ease);
}

.project-row:hover .project-arrow {
  color: var(--accent);
  transform: translate(4px, -4px);
}

/* ── Terminal block ───────────────────────────────────────── */
.terminal {
  background: #0d0d0d;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  margin-top: 5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 1.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red   { background: #ff5f57; }
.dot.yellow{ background: #ffbd2e; }
.dot.green { background: #28c840; }

.terminal-line { color: var(--muted); }
.terminal-line .prompt { color: var(--accent); }
.terminal-line .cmd    { color: var(--text); }
.terminal-line .out    { color: #888; }
.terminal-line .val    { color: var(--accent); }
.terminal-cursor {
  display: inline-block;
  width: 10px;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* ── Contact ──────────────────────────────────────────────── */
#contact {
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact-headline {
  font-size: clamp(3rem, 7vw, 7rem);
  margin-bottom: 1.5rem;
}

.contact-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.contact-link:hover { color: var(--accent); }

.contact-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}

footer p {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ── Reveal animation (JS adds .visible) ──────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50%       { opacity: 0.3; transform: scaleY(0.6); }
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 1.25rem 2rem; }

  section { padding: 7rem 2rem; }

  .about-grid { grid-template-columns: 1fr; gap: 3rem; }

  .project-row {
    grid-template-columns: 40px 1fr;
  }

  .project-tech { display: none; }

  footer { padding: 2rem; flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }

  .hero-cta { flex-direction: column; }

  .stats-row { flex-direction: column; gap: 1.5rem; }

  .contact-links { flex-direction: column; align-items: center; }
}
