/* 01-dev-portfolio — Dark geometric developer portfolio */

:root {
  --bg: #0F172A;
  --bg-elevated: #1E293B;
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --accent: #22C55E;
  --accent-dim: rgba(34, 197, 94, 0.15);
  --border: #334155;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --max-width: 72rem;
  --nav-height: 4rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: 0;
}

.skip-link:focus { top: 1rem; }

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 2rem;
  height: 2rem;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-links a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--border);
  background: var(--bg-elevated);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem;
  cursor: pointer;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.section-desc {
  color: var(--text-muted);
  max-width: 40rem;
  margin: 0 0 2.5rem;
}

/* Hero */
.hero {
  padding: 6rem 0 5rem;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: end;
}

.hero-tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-display);
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--accent);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 1.5rem;
}

.hero h1 span { color: var(--accent); }

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover { background: #16a34a; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-code-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1.5rem;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  min-width: 280px;
}

.hero-code-block .comment { color: var(--text-muted); }
.hero-code-block .keyword { color: #60a5fa; }
.hero-code-block .string { color: var(--accent); }
.hero-code-block .fn { color: #c084fc; }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.skill-card {
  background: var(--bg);
  padding: 2rem;
}

.skill-card svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin: 0 0 0.75rem;
}

.skill-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0 0 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags span {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.project-card-header {
  padding: 1.5rem 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
}

.project-card-body {
  padding: 1rem 1.5rem 1.5rem;
  flex: 1;
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0 0 1rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-meta span {
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.25rem 0.5rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.project-link svg { width: 1rem; height: 1rem; }

/* About page */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.about-photo {
  aspect-ratio: 4/5;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.about-photo::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 2px solid var(--accent);
}

.about-photo-inner {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.3;
}

.about-bio p {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 2rem;
}

.stat {
  background: var(--bg);
  padding: 1.5rem;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
}

.stat span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 0.375rem;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--accent);
  transform: translateX(-5px);
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-year {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-item h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

/* Tech stack */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.tech-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1.25rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.2s;
}

.tech-item:hover { border-color: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.footer-links a:hover { color: var(--accent); }
.footer-links svg { width: 1.125rem; height: 1.125rem; }

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
  }

  .nav-links.is-open { display: flex; }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-code-block { min-width: unset; }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }
}
