/* ============================================================
   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);
  --nav-scrolled-bg: rgba(8, 8, 8, 0.85);
  --card-hover:      #161616;
  --btn-text:        #000;
}

/* ── Themes ────────────────────────────────────────────────── */

/* Light Mode, Pearl: crisp white, cobalt blue accent */
[data-theme="pearl"] {
  --bg:              #bdbdbd;
  --surface:         #fff4b3;
  --border:          #dde2ea;
  --accent:          #f6e340;
  --text:            #0d1117;
  --muted:           #6b7685;
  --nav-scrolled-bg: rgba(247, 248, 250, 0.92);
  --card-hover:      #edf0f5;
  --btn-text:        #ffffff;
}

/* Hide hero decorative grid + glow in light mode (designed for dark bg) */
[data-theme="pearl"] #hero::before,
[data-theme="pearl"] #hero::after { opacity: 0; }

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: var(--nav-scrolled-bg);
  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); }

/* ── Theme toggle (sun / moon pill) ───────────────────────── */
#theme-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease);
}
#theme-toggle:hover { border-color: var(--accent); }
#theme-toggle i {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

/* Dark mode: moon is active */
html:not([data-theme="pearl"]) #theme-toggle .fa-moon {
  background: var(--accent);
  color: var(--surface);
}

/* Light mode: sun is active */
html[data-theme="pearl"] #theme-toggle .fa-sun {
  background: var(--accent);
  color: var(--surface);
}

/* ── 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;
}

.hero-glow {
  background: radial-gradient(circle, rgba(0,255,135,0.06) 0%, transparent 70%);
  transition: background 0.4s var(--ease);
}

[data-theme="pearl"] .hero-glow {
  background: radial-gradient(circle, rgba(246,227,64,0.06) 0%, transparent 70%);
}

.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-primary {
  background-color: var(--accent);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  color: black;

}
.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  transition: background-color 0.4s ease, color 0.4s ease;
}

.btn-ghost:hover {
  border: none;
  color: white;
  background-color: rgb(0 255 135 / 0.31);
}

[data-theme="pearl"] .btn-ghost:hover {
  border: none;
  color: white;
  background-color: black;
}

.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: var(--card-hover); }

[data-theme="pearl"] .skill-card {
  background: radial-gradient(circle, rgba(246,227,64,0.06) 0%, transparent 70%);
}

[data-theme="pearl"] .skill-card:hover .tag {
  background-color: black;
}

.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);
  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);
}

/* Inline links for cards that point at more than one live URL */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.9rem;
}

.project-links a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.project-links a:hover { color: var(--accent); }

/* Cards without a live link: no hover affordance, no arrow column */
.project-row-static {
  grid-template-columns: 60px 1fr auto;
  cursor: default;
}

.project-row-static:hover { padding-left: 0; }

/* Secondary "also built" line: smaller than a card, sits under the list */
.also-built {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  padding-top: 2rem;
}

.also-built-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.also-built a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}

.also-built a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.also-built-note {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Studio CTA ───────────────────────────────────────────── */
#studio {
  border-top: 1px solid var(--border);
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.studio-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 3rem;
}

.studio-headline {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  color: var(--text);
}

.studio-sub {
  margin-top: 0.9rem;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
}

.studio-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.studio-cta .btn-ghost {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

/* ── 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;
}

.footer-links {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

/* ── 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; }

  .studio-inner { flex-direction: column; align-items: flex-start; padding: 2rem; }

  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; }

  .studio-cta { flex-direction: column; align-self: stretch; }

  .studio-cta .btn { justify-content: center; text-align: center; }

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