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

:root {
  --bg:        #f9f8f6;
  --bg-alt:    #f1efe9;
  --fg:        #111110;
  --fg-muted:  #6b6a66;
  --accent:    #1a1a18;
  --border:    #dddbd4;
  --font-display: 'DM Serif Display', serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --max:       1100px;
  --radius:    6px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── NAV ───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  background: rgba(249, 248, 246, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--fg);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

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

/* ─── HERO ──────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 3rem 5rem;
  max-width: var(--max);
  margin: 0 auto;
  animation: fadeUp 0.9s ease both;
}

.hero-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  margin-bottom: 2.5rem;
  width: fit-content;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.9s 0.1s ease both;
}

.hero-sub {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
  animation: fadeUp 0.9s 0.2s ease both;
}

.hero-line {
  width: 48px;
  height: 1px;
  background: var(--border);
  margin-bottom: 2rem;
}

.hero-desc {
  max-width: 480px;
  color: var(--fg-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.9s 0.3s ease both;
}

/* ─── BUTTONS ───────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-right: 0.75rem;
  margin-bottom: 0.75rem;
  transition: opacity 0.2s, transform 0.2s;
}

.btn:hover { opacity: 0.82; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-ghost:hover { background: var(--bg-alt); opacity: 1; }

/* ─── SECTIONS ──────────────────────────────────── */
.section {
  padding: 7rem 3rem;
  max-width: var(--max);
  margin: 0 auto;
}

.section-alt {
  background: var(--bg-alt);
  max-width: 100%;
  padding: 7rem 0;
}

.section-alt > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 3rem;
  padding-right: 3rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 3rem;
  letter-spacing: -0.01em;
}

/* ─── ABOUT ─────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 5rem;
  align-items: start;
}

.about-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--fg-muted);
  margin-bottom: 1rem;
  max-width: 520px;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 0.5rem;
}

.stat { border-top: 1px solid var(--border); padding-top: 1.2rem; }

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
}

/* ─── SKILLS ────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.skill-card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}

.skill-icon { font-size: 1.6rem; margin-bottom: 1rem; }

.skill-card h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.skill-card p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ─── PROJECTS ──────────────────────────────────── */
.projects-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: block;
  transition: box-shadow 0.2s, transform 0.2s;
}

a.project-card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.project-wip {
  opacity: 0.7;
  cursor: default;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-lang {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-weight: 500;
}

.lang-css  { background: #dbeafe; color: #1d4ed8; }
.lang-c    { background: #fce7f3; color: #9d174d; }
.lang-bat  { background: #d1fae5; color: #065f46; }

.project-arrow {
  font-size: 1rem;
  color: var(--fg-muted);
  transition: transform 0.2s;
}

a.project-card:hover .project-arrow { transform: translate(2px, -2px); }

.project-wip-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ─── CONTACT ───────────────────────────────────── */
.contact-wrap {
  max-width: 560px;
}

.contact-wrap h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.contact-wrap p {
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

/* ─── FOOTER ────────────────────────────────────── */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 3rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  max-width: 100%;
}

/* ─── ANIMATIONS ────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section { animation: fadeUp 0.7s ease both; }

/* ─── RESPONSIVE ────────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 1rem 1.5rem; }
  .hero, .section { padding-left: 1.5rem; padding-right: 1.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .skills-grid, .projects-list { grid-template-columns: 1fr 1fr; }
  .footer { padding: 1.5rem; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .skills-grid, .projects-list { grid-template-columns: 1fr; }
  .hero-name { font-size: 3.5rem; }
}
