:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --line: #e7e7e7;
  --accent: #111111;
  --accent-text: #ffffff;
  --radius: 14px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e;
    --surface: #161616;
    --text: #f2f2f2;
    --muted: #9a9a9a;
    --line: #262626;
    --accent: #f2f2f2;
    --accent-text: #0e0e0e;
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 700; letter-spacing: -0.02em; }
.nav nav { display: flex; gap: 28px; }
.nav nav a { font-size: 0.95rem; color: var(--muted); transition: color .2s; }
.nav nav a:hover { color: var(--text); }

/* HERO */
.hero { padding: 140px 24px 120px; }
.eyebrow {
  font-size: 0.85rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted); margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 600; line-height: 1.1; letter-spacing: -0.035em;
  max-width: 18ch;
}
.hero h1 .muted { font-weight: 500; }
.hero-actions { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }

/* BUTTONS */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 500;
  transition: transform .2s, opacity .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { opacity: .85; }
.btn-ghost { border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--text); }

/* SECTIONS */
.section { padding: 100px 24px; border-top: 1px solid var(--line); }
.section-head { margin-bottom: 48px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -0.03em; margin-bottom: 8px; }

/* WORK GRID */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.08); }
.thumb {
  aspect-ratio: 16 / 10; display: grid; place-items: center;
  font-weight: 700; letter-spacing: 0.2em; font-size: 0.8rem; color: rgba(255,255,255,.85);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-1 { background: linear-gradient(135deg, #2b2b2b, #555); }
.thumb-2 { background: linear-gradient(135deg, #5b7c99, #a8c0d6); }
.thumb-3 { background: linear-gradient(135deg, #7a8b6f, #c4cfb4); }
.thumb-4 { background: linear-gradient(135deg, #8a7064, #d6bfb2); }
.card-body { padding: 22px 24px 26px; }
.card-body h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; margin: 10px 0 6px; }
.card-body p { font-size: 0.95rem; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags span {
  font-size: 0.75rem; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}

/* ABOUT */
.about { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.about-body p { font-size: 1.1rem; margin-bottom: 16px; max-width: 60ch; }
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 32px; }
.skills h4 {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); font-weight: 500; margin-bottom: 12px;
}
.skills ul { list-style: none; }
.skills li { padding: 8px 0; border-bottom: 1px solid var(--line); }

/* CONTACT */
.contact { text-align: center; padding: 120px 24px; }
.contact h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.links { display: flex; justify-content: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

/* FOOTER */
.footer {
  display: flex; justify-content: space-between; padding: 32px 24px;
  border-top: 1px solid var(--line); font-size: 0.9rem;
}

/* REVEAL ANIMATION */
/* Only hide content when the script is running, so the page never stays blank */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* MOBILE */
@media (max-width: 720px) {
  .hero { padding: 96px 24px 80px; }
  .grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 16px; }
  .section { padding: 72px 24px; }
  .nav nav { gap: 18px; }
}
