
:root {
  /* dark theme (default) */
  --bg: #131413;
  --surface: #1c1c1a;
  --surface-hover: #232320;
  --border: #2a2a27;
  --text: #faf9f5;
  --text-secondary: #b0aea5;

  /* accents for both themes */
  --orange: #0ea5a0;
  --blue: #6a9bcc;
  --green: #34d399;

  --font-heading: 'Poppins', Arial, sans-serif;
  --font-body: 'Lora', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --container: 1120px;
  --nav-height: 72px;
}

[data-theme="light"] {
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-hover: #f2f0e8;
  --border: #e8e6dc;
  --text: #141413;
  --text-secondary: #6b6a63;
}


*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

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

p { margin: 0; }

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

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.accent-orange { color: var(--orange); }
.accent-blue { color: var(--blue); }
.accent-green { color: var(--green); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--orange);
  color: #141413;
  padding: 10px 16px;
  z-index: 200;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 0;
  background: var(--orange);
  transition: width 0.2s ease;
}

.nav-link:hover::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.theme-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 52px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.theme-track svg {
  position: relative;
  z-index: 1;
  color: var(--text-secondary);
  transition: color 0.25s ease;
}

.theme-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--orange);
  transition: transform 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* light theme = knob parked left, over the sun icon */
[data-theme="light"] .theme-knob { transform: translateX(0); }
[data-theme="light"] .icon-sun { color: #141413; }

/* dark theme = knob slides right, over the moon icon */
[data-theme="dark"] .theme-knob { transform: translateX(24px); }
[data-theme="dark"] .icon-moon { color: #141413; }

@media (prefers-reduced-motion: reduce) {
  .theme-knob { transition: none; }
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hero {
  padding: 72px 0 96px;
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.hero-text h1 {
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-bio {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--orange);
  color: #141413;
  font-weight: 500;
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-2px);
}

.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.4);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, var(--text) 4%);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #e5675f; }
.dot-yellow { background: #e5c15f; }
.dot-green { background: var(--green); }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-left: 8px;
}

.terminal-body {
  padding: 22px 20px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  min-height: 180px;
}

.terminal-body p {
  margin-bottom: 10px;
}

.prompt {
  color: var(--green);
  margin-right: 8px;
}

.output {
  color: var(--blue);
  min-height: 1.3em;
}

.cursor {
  color: var(--orange);
  animation: blink 1s step-end infinite;
}

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


#about, #skills, #projects, #contact {
  scroll-margin-top: var(--nav-height);
}

.section {
  padding: 88px 0;
}

.section-alt {
  background: color-mix(in srgb, var(--bg) 96%, var(--text) 4%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--blue);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 36px;
}

.about-body {
  max-width: 68ch;
  color: var(--text-secondary);
  font-size: 1.05rem;
}
.about-body strong { color: var(--text); font-weight: 500; }


.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.skill-card:hover {
  transform: translateY(-2px) rotate(0.5deg);
  outline: 1px solid var(--orange);
}



.skill-card h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-icon {
  display: inline-flex;
  align-items: center;
  color: var(--orange);
}
.skill-icon svg {
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 14%, var(--surface));
  color: var(--blue);
  border: 1px solid color-mix(in srgb, var(--blue) 30%, var(--border));
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.project-card:hover {
  transform: translateY(-2px) rotate(-0.5deg);
  outline: 1px solid var(--orange);
}

.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 600;
}

.badge-progress {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--orange);
  border: 1px solid color-mix(in srgb, var(--orange) 40%, var(--border));
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.96rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 14%, var(--surface));
  color: var(--green);
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--border));
}

.project-tag-placeholder {
  background: transparent;
  color: var(--text-secondary);
  border: 1px dashed var(--border);
}

.project-links {
  display: flex;
  gap: 16px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.project-link {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.project-link:hover {
  color: var(--orange);
  border-color: var(--orange);
}

.footer {
  padding: 88px 0 48px;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  margin-bottom: 36px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 40%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--green) 0%, transparent); }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}

.footer-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: color 0.3s ease, background 0.3s ease;
}

.footer-link:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .terminal { order: -1; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open {
    max-height: 300px;
  }
  .nav-links a {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
  }
  .nav-burger { display: flex; }

  .nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero-cta { flex-direction: column; }
  .btn { justify-content: center; width: 100%; }
  .footer-links { gap: 20px; }
}


.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 560px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin: 0 0 12px;
  color: var(--text);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.modal-body {
  font-family: var(--font-body);
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

button.project-link {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
}