html {
  scroll-behavior: smooth;
}

:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-2: #0a0a0a;
  --surface: #111111;
  --surface-2: #1a1a1a;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text: #f5f5f7;
  --text-secondary: #86868b;
  --accent: #2997ff;
  --accent-hover: #4db3ff;
  --white-faded: rgba(255, 255, 255, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  font-family: "Sora", -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 15% 30%, rgba(60, 100, 220, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 60% 45% at 80% 15%, rgba(160, 60, 200, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 85%, rgba(30, 180, 160, 0.13) 0%, transparent 65%),
    radial-gradient(ellipse 50% 35% at 65% 55%, rgba(100, 50, 180, 0.10) 0%, transparent 60%);
}

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

/* ─── Header ─────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(20px);
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  font-family: "JetBrains Mono", monospace;
  color: #7aa2ff;
}

.logo-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.nav a {
  transition: color 0.2s ease;
}

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


/* ─── Main layout ────────────────────────────────────── */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 100px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 140px;
  position: relative;
  z-index: 2;
}

/* ─── Hero ────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.hero-copy h1 strong {
  color: #7aa2ff;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
}

.lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 480px;
}

.chip-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 5px 14px;
  border-radius: 980px;
  border: 1px solid var(--border);
  background: var(--white-faded);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: border-color 0.2s ease;
}

.chip:hover {
  border-color: var(--border-hover);
}

.cta-row {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── Buttons ─────────────────────────────────────────── */

.btn {
  padding: 12px 24px;
  border-radius: 980px;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

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

.btn.secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn.secondary:hover {
  background: var(--white-faded);
  border-color: var(--border-hover);
}

/* ─── Laptop mockup (preserved) ──────────────────────── */

.hero-device {
  position: relative;
  display: flex;
  justify-content: center;
}

.laptop {
  width: min(520px, 90vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.65));
}

.laptop-top {
  width: 100%;
  background: linear-gradient(180deg, rgba(14, 20, 32, 0.95), rgba(4, 8, 16, 0.95));
  border-radius: 22px 22px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.camera {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #6cfad8, #1b2c3c 70%);
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.screen {
  background: rgba(3, 7, 12, 0.9);
  border-radius: 16px;
  padding: 14px 16px 18px;
  border: 1px solid rgba(108, 250, 216, 0.15);
}

.screen-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: #9fb0c8;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red { background: #ff6b6b; }
.dot.yellow { background: #feca57; }
.dot.green { background: #1dd1a1; }

.screen-title {
  margin-left: auto;
  color: #7aa2ff;
}

.screen-body {
  display: grid;
  gap: 18px;
}

.terminal {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: #e9f1ff;
  display: grid;
  gap: 8px;
}

.prompt {
  color: #6cfad8;
  margin-right: 6px;
}

.hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hud-card {
  background: rgba(10, 18, 32, 0.9);
  border: 1px solid rgba(122, 162, 255, 0.25);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  font-size: 0.85rem;
}

.hud-label {
  color: #9fb0c8;
  display: block;
  margin-bottom: 4px;
}

.hud-card strong {
  color: #e9f1ff;
}

.laptop-bottom {
  width: 120%;
  height: 28px;
  background: linear-gradient(180deg, rgba(20, 30, 42, 0.95), rgba(6, 10, 18, 0.95));
  border-radius: 0 0 40px 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: -6px;
}

.device-shadow {
  position: absolute;
  width: 70%;
  height: 40px;
  bottom: -30px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.65), transparent 70%);
  filter: blur(8px);
}

/* ─── Section headings ───────────────────────────────── */

.section-head {
  margin-bottom: 8px;
}

.section-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: "JetBrains Mono", monospace;
  color: #7aa2ff;
}

.section-head p {
  color: var(--text-secondary);
  max-width: 520px;
  margin-top: 8px;
}

/* ─── Skills ──────────────────────────────────────────── */

.skills {
  display: grid;
  gap: 48px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.skill-card {
  background: var(--surface);
  padding: 32px 28px;
  display: grid;
  gap: 14px;
}

.skill-card:nth-child(1) {
  border-radius: 20px 0 0 0;
}

.skill-card:nth-child(2) {
  border-radius: 0 20px 0 0;
}

.skill-card:nth-child(3) {
  border-radius: 0 0 0 20px;
}

.skill-card:nth-child(4) {
  border-radius: 0 0 20px 0;
}

.skill-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--white-faded);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.skill-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: "JetBrains Mono", monospace;
  color: #7aa2ff;
}

.skill-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.skill-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ─── Projects ────────────────────────────────────────── */

.projects {
  display: grid;
  gap: 48px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.app-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  transition: border-color 0.3s ease;
}

.app-card:hover {
  border-color: var(--border-hover);
}

.app-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.app-top h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
  font-family: "JetBrains Mono", monospace;
  color: #7aa2ff;
}

.badge {
  padding: 4px 10px;
  border-radius: 980px;
  font-size: 0.6875rem;
  font-family: "JetBrains Mono", monospace;
  background: var(--white-faded);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-private {
  background: rgba(255, 149, 0, 0.08);
  color: #ff9500;
  border-color: rgba(255, 149, 0, 0.2);
}

.badge-soon {
  background: rgba(48, 209, 88, 0.08);
  color: #30d158;
  border-color: rgba(48, 209, 88, 0.2);
}

.app-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 16px;
}

.app-card details {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.app-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--accent);
  font-size: 0.75rem;
  transition: color 0.2s ease;
  list-style: none;
}

.app-card summary::-webkit-details-marker {
  display: none;
}

.app-card summary > span::before {
  content: "▶ ";
  display: inline;
  font-size: 0.6rem;
  transition: transform 0.2s ease;
}

.app-card details[open] summary > span::before {
  content: "▼ ";
}

.app-card summary:hover > span {
  color: var(--accent-hover);
}

.app-card details ul {
  display: grid;
  gap: 8px;
  padding-left: 16px;
  line-height: 1.55;
}

.app-card details ul li::marker {
  color: rgba(255, 255, 255, 0.2);
}

/* ─── Contact ─────────────────────────────────────────── */

.contact {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 80px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--white-faded);
  border-radius: 24px;
}

.contact h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: "JetBrains Mono", monospace;
  color: #7aa2ff;
}

.contact-desc {
  color: var(--text-secondary);
  max-width: 440px;
  font-size: 1rem;
  line-height: 1.65;
}

.contact-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* ─── Footer ──────────────────────────────────────────── */

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.footer-muted {
  font-family: "JetBrains Mono", monospace;
}

/* ─── Scroll reveal ───────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ─── Responsive ──────────────────────────────────────── */

@media (max-width: 980px) {
  main {
    gap: 100px;
  }

  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-device {
    order: -1;
  }

  .hero-copy h1 {
    margin-bottom: 16px;
  }

  .lead {
    margin: 0 auto;
  }

  .chip-row {
    justify-content: center;
  }

  .cta-row {
    justify-content: center;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .skill-card:nth-child(1) {
    border-radius: 20px 20px 0 0;
  }

  .skill-card:nth-child(2),
  .skill-card:nth-child(3) {
    border-radius: 0;
  }

  .skill-card:nth-child(4) {
    border-radius: 0 0 20px 20px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  main {
    padding: 60px 16px 48px;
    gap: 72px;
  }

  .header-inner {
    padding: 12px 16px;
  }

  .logo {
    font-size: 0.85rem;
  }

  .logo-avatar {
    width: 28px;
    height: 28px;
  }

  .nav {
    gap: 18px;
    font-size: 0.8125rem;
  }

  .hero-copy h1 {
    font-size: clamp(1.3rem, 5vw, 1.6rem);
    margin-bottom: 14px;
  }

  .lead {
    font-size: 0.95rem;
  }

  .chip {
    padding: 4px 11px;
    font-size: 0.75rem;
  }

  .chip-row {
    margin-top: 22px;
  }

  .cta-row {
    margin-top: 24px;
    flex-direction: column;
    align-items: stretch;
  }

  .cta-row .btn {
    justify-content: center;
  }

  .laptop {
    width: min(420px, 85vw);
  }

  .laptop-top {
    padding: 14px;
    border-radius: 16px 16px 12px 12px;
  }

  .screen {
    padding: 10px 12px 14px;
    border-radius: 12px;
  }

  .screen-head {
    font-size: 0.65rem;
    margin-bottom: 12px;
  }

  .terminal {
    font-size: 0.7rem;
    gap: 6px;
  }

  .hud {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .hud-card {
    padding: 8px 6px;
    font-size: 0.7rem;
    border-radius: 8px;
  }

  .hud-label {
    font-size: 0.6rem;
  }

  .laptop-bottom {
    height: 22px;
  }

  .section-label {
    font-size: 0.7rem;
  }

  .section-head h2 {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
  }

  .skill-card {
    padding: 24px 20px;
  }

  .skill-card h3 {
    font-size: 0.95rem;
  }

  .skill-card p {
    font-size: 0.85rem;
  }

  .app-card {
    padding: 22px 20px;
  }

  .app-icon {
    width: 40px;
    height: 40px;
  }

  .app-top h3 {
    font-size: 1.1rem;
  }

  .app-desc {
    font-size: 0.85rem;
  }

  .app-card summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .contact {
    padding: 56px 20px;
    border-radius: 18px;
  }

  .contact-desc {
    font-size: 0.9rem;
  }

  .contact-actions {
    flex-direction: column;
    width: 100%;
  }

  .contact-actions .btn {
    justify-content: center;
  }

  .site-footer {
    text-align: center;
    font-size: 0.75rem;
    padding: 24px 16px 36px;
  }
}

@media (max-width: 380px) {
  main {
    padding: 48px 14px 40px;
    gap: 60px;
  }

  .logo {
    font-size: 0.8rem;
    gap: 8px;
  }

  .nav {
    gap: 14px;
    font-size: 0.75rem;
  }

  .hero-copy h1 {
    font-size: 1.2rem;
  }

  .lead {
    font-size: 0.88rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  .laptop {
    width: 88vw;
  }

  .terminal {
    font-size: 0.6rem;
  }

  .hud-card {
    padding: 6px 4px;
    font-size: 0.6rem;
  }

  .hud-label {
    font-size: 0.55rem;
  }

  .skill-card {
    padding: 20px 16px;
  }

  .app-card {
    padding: 18px 16px;
  }

  .contact {
    padding: 44px 16px;
  }
}

/* ─── App meta links (project cards) ─────────────────── */

.app-meta-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-meta-links a {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.app-meta-links a:hover {
  color: #7aa2ff;
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-secondary);
  opacity: 0.4;
  flex-shrink: 0;
}
