/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ─── Tokens ─────────────────────────────────────────── */
:root {
  --bg:      #fafaf8;
  --surface: #ffffff;
  --border:  #e8e6e0;
  --border2: #d4d1ca;
  --muted:   #f4f4f1;
  --text:    #111111;
  --subtle:  #666666;
  --ghost:   #aaaaaa;
  --faint:   #cccccc;
  --green:   #22c55e;
  --mono:    'DM Mono', monospace;
  --display: 'Syne', sans-serif;
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Base ───────────────────────────────────────────── */
body {
  font-family: var(--display);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── Custom cursor ──────────────────────────────────── */
body { cursor: none; }

.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s var(--ease), height 0.2s var(--ease), background 0.2s;
}

.cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease), height 0.35s var(--ease),
              border-color 0.2s, transform 0.08s linear;
}

body.cursor-hover .cursor       { width: 14px; height: 14px; }
body.cursor-hover .cursor-ring  { width: 48px; height: 48px; border-color: rgba(0,0,0,0.12); }

/* ─── Nav ────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 48px;
  height: 64px;
  background: rgba(250,250,248,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.nav.scrolled { box-shadow: 0 1px 24px rgba(0,0,0,0.06); }

.nav-logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ghost);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.25s var(--ease);
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 20px;
  background: var(--text);
  color: var(--bg);
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover { background: #333; transform: translateY(-1px); }

/* ─── Hero ───────────────────────────────────────────── */
.hero {
  padding: 100px 48px 88px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ghost);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp 0.6s var(--ease) 0.1s forwards;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--faint);
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(38px, 4.8vw, 58px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 26px;
  opacity: 0;
  animation: fadeUp 0.65s var(--ease) 0.2s forwards;
}

.hero-title .dim {
  color: var(--ghost);
  font-weight: 400;
  font-style: italic;
}

.hero-sub {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--subtle);
  line-height: 1.9;
  max-width: 400px;
  margin-bottom: 42px;
  opacity: 0;
  animation: fadeUp 0.65s var(--ease) 0.3s forwards;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  opacity: 0;
  animation: fadeUp 0.65s var(--ease) 0.4s forwards;
}

.hero-aside {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.35s forwards;
  box-shadow: 0 4px 32px rgba(0,0,0,0.04);
}

.aside-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.aside-row:hover { background: var(--muted); }
.aside-row:last-of-type { border-bottom: none; }

.aside-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.aside-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}

.aside-status {
  background: var(--muted);
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.3); }
  50%       { opacity: 0.5; box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}

.status-txt {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--subtle);
}

/* ─── Buttons ────────────────────────────────────────── */
.btn-primary {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 28px;
  background: var(--text);
  color: var(--bg);
  border-radius: 3px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover { background: #333; transform: translateY(-1px); }

.btn-ghost-link {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--subtle);
  text-decoration: none;
  border-bottom: 1px solid var(--border2);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.btn-ghost-link:hover { color: var(--text); border-color: var(--subtle); }

/* ─── Sections ───────────────────────────────────────── */
.section {
  padding: 80px 48px;
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 48px;
}

.section-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.7px;
  color: var(--text);
}

/* ─── About ──────────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.about-text {
  font-size: 15px;
  color: var(--subtle);
  line-height: 2;
}

.divider {
  width: 36px;
  height: 2px;
  background: var(--border);
  margin: 28px 0;
}

.skills-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 7px 14px;
  border: 1px solid var(--border2);
  border-radius: 3px;
  color: var(--ghost);
  letter-spacing: 0.04em;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  cursor: default;
}

.skill-pill:hover,
.skill-pill.active {
  border-color: var(--text);
  color: var(--text);
  background: var(--muted);
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

.profile-top {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 42px;
  height: 42px;
  background: var(--text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--bg);
  flex-shrink: 0;
}

.profile-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

.profile-role {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ghost);
  margin-top: 3px;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.profile-stat {
  padding: 18px 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.profile-stat:hover { background: var(--muted); }
.profile-stat:nth-child(even) { border-right: none; }
.profile-stat:nth-last-child(-n+2) { border-bottom: none; }

.ps-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
}

.ps-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ─── Projects ───────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px 28px 26px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
  cursor: default;
}

.project-card:hover {
  border-color: var(--border2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.project-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.12em;
}

.project-arrow {
  font-size: 16px;
  color: var(--faint);
  transition: color 0.2s, transform 0.2s var(--ease);
}

.project-card:hover .project-arrow {
  color: var(--subtle);
  transform: translate(3px, -3px);
}

.project-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 8px;
}

.project-desc {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ghost);
  line-height: 1.85;
  margin-bottom: 24px;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 5px 11px;
  background: var(--muted);
  color: var(--ghost);
  border-radius: 3px;
  border: 1px solid var(--border);
  letter-spacing: 0.04em;
}

/* ─── Contact ────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.contact-headline {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 12px;
}

.contact-sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ghost);
  line-height: 1.9;
}

.contact-links {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.15s;
  position: relative;
}

.contact-link::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--text);
  transform: scaleY(0);
  transition: transform 0.2s var(--ease);
}

.contact-link:hover::after { transform: scaleY(1); }
.contact-link:last-child { border-bottom: none; }
.contact-link:hover { background: var(--muted); }

.contact-icon {
  width: 32px;
  height: 32px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ghost);
  flex-shrink: 0;
}

.contact-info { flex: 1; }

.contact-type {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.contact-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.contact-chevron {
  font-size: 18px;
  color: var(--faint);
  transition: transform 0.2s var(--ease), color 0.2s;
}

.contact-link:hover .contact-chevron {
  color: var(--subtle);
  transform: translateX(3px);
}

/* ─── Footer ─────────────────────────────────────────── */
.footer {
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-txt {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.04em;
}

/* ─── Reveal animation ───────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

.reveal .section-header { transition-delay: 0s; }
.reveal .about-layout,
.reveal .projects-grid,
.reveal .contact-layout { transition-delay: 0.08s; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; padding: 60px 20px 48px; gap: 40px; }
  .about-layout,
  .contact-layout { grid-template-columns: 1fr; gap: 36px; }
  .projects-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 20px; }
  .footer  { padding: 20px; flex-direction: column; gap: 8px; text-align: center; }
}
