/* ============================================
   PORTFOLIO — style.css
   ============================================ */

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

/* ── CSS Variables (Light mode) ── */
:root {
  --bg: #f2f4f4;
  --surface: #e6e9e9;
  --border: #cdd2d2;
  --ink: #0d0f0f;
  --ink-muted: #5a6363;
  --accent: #009e8e;
  --accent-light: #d8f4f1;
  --silver: #8a9494;
  --nav-bg: rgba(242,244,244,0.88);
  --mono: 'DM Mono', monospace;
  --sans: 'DM Sans', sans-serif;
  --radius: 6px;
  --max: 760px;
}

/* ── Dark mode overrides (Mercedes AMG) ── */
html.dark {
  --bg: #080808;
  --surface: #111111;
  --border: #222222;
  --ink: #e0e4e4;
  --ink-muted: #6b7474;
  --accent: #00D2BE;
  --accent-light: #001a18;
  --silver: #9ea8a8;
  --nav-bg: rgba(8,8,8,0.92);
}

html { scroll-behavior: smooth; }

*, *::before, *::after {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   NAV
   ============================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 3rem);
  height: 56px;
}
.nav-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 13px;
  color: var(--ink-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 0.75rem; }

/* ── Dark mode toggle ── */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--ink); }
.theme-toggle svg { width: 15px; height: 15px; }
.icon-sun { display: none; }
.icon-moon { display: block; }
html.dark .icon-sun { display: block; }
html.dark .icon-moon { display: none; }

/* ── CV button ── */
.btn-cv {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.35rem;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-cv:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-cv svg { width: 12px; height: 12px; }

/* ============================================
   LAYOUT
   ============================================ */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 2.5rem);
}

section { padding: 64px 0 0; }
section:last-of-type { padding-bottom: 40px; }

/* ============================================
   HERO
   ============================================ */
#hero { padding-top: 80px; padding-bottom: 0; }

.hero-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.5s 0.1s forwards;
}
h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: fadeUp 0.5s 0.2s forwards;
}
h1 strong { font-weight: 300; }
.hero-sub {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeUp 0.5s 0.3s forwards;
}
.hero-actions {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.5s 0.4s forwards;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--sans);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.15s;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: #1a1a1a; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface); transform: translateY(-1px); }

/* ============================================
   SECTION SHARED
   ============================================ */
.section-rule { height: 1px; background: var(--border); margin-bottom: 1.5rem; }
.section-heading {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 400;
  margin-bottom: 0.75rem;
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.about-text p { font-size: 1rem; color: var(--ink-muted); line-height: 1.8; margin-bottom: 1rem; }
.about-text p:last-child { margin-bottom: 0; }
.about-meta { display: flex; flex-direction: column; gap: 0.6rem; }
.meta-item {
  display: flex; flex-direction: column;
  padding: 0.25rem 0;
}
.meta-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.meta-value { font-size: 14px; font-weight: 500; }

/* ============================================
   SKILLS
   ============================================ */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.skill-group {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.15s;
}
.skill-group:hover { border-color: var(--accent); transform: translateY(-2px); }
.skill-group-name {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skill-tag {
  font-size: 12px;
  color: var(--ink-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
}

/* ============================================
   PROJECTS
   ============================================ */
.projects-list { display: flex; flex-direction: column; gap: 1px; }
.project-item {
  display: grid; grid-template-columns: 1fr auto;
  align-items: start; gap: 1.5rem;
  padding: 0;
  cursor: default;
}
.project-num { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); margin-bottom: 0.5rem; }
.project-title { font-size: 1.05rem; font-weight: 500; margin-bottom: 0.4rem; letter-spacing: -0.01em; }
.project-desc { font-size: 1rem; color: var(--ink-muted); line-height: 1.65; max-width: 480px; margin-bottom: 0.8rem; }
.project-stack { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.stack-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}
.project-links { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; }
.project-link {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
  text-decoration: none;
  display: flex; align-items: center; gap: 0.3rem;
  transition: color 0.15s;
  white-space: nowrap;
}
.project-link:hover { color: var(--accent); }
.project-link svg { width: 12px; height: 12px; }

/* ============================================
   CONTACT
   ============================================ */
#contact { padding-bottom: 56px; }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.contact-text h2 { font-size: 1.05rem; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 0.75rem; }
.contact-text h2 strong { font-weight: 500; }
.contact-text p { font-size: 1rem; color: var(--ink-muted); line-height: 1.7; margin-bottom: 1.5rem; }
.contact-links { display: flex; flex-direction: column; gap: 0.5rem; }
.contact-link {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 14px; color: var(--ink-muted);
  text-decoration: none; transition: color 0.15s;
}
.contact-link:hover { color: var(--ink); }
.contact-link-icon {
  width: 28px; height: 28px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-link-icon svg { width: 13px; height: 13px; }
.contact-form { display: flex; flex-direction: column; gap: 0.75rem; }
.form-row { display: flex; flex-direction: column; gap: 0.35rem; }
.form-row label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted);
}
.form-row input, .form-row textarea {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.65rem 0.875rem;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  outline: none; transition: border-color 0.15s; resize: vertical;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--accent); }
.form-row textarea { min-height: 100px; }

/* ============================================
   FOOTER
   ============================================ */
footer {
  padding: 1.5rem clamp(1.5rem, 5vw, 2.5rem);
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-copy { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
  .about-grid, .contact-inner { grid-template-columns: 1fr; }
  .project-item { grid-template-columns: 1fr; }
  .project-links { flex-direction: row; align-items: center; }
  .nav-links { display: none; }
}
