/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f172a;
  --surface:   #1e293b;
  --surface-2: #263348;
  --border:    #334155;
  --text:      #e2e8f0;
  --muted:     #94a3b8;
  --accent:    #38bdf8;
  --accent-dim:#0ea5e9;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --mono:      'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 900px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Nav */
header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  z-index: 100;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-name {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

nav a:hover { color: var(--text); }

/* Main layout */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

section { padding: 4rem 0; }
section + section { border-top: 1px solid var(--border); }

/* Hero */
#hero { padding: 7rem 0 4rem; }

h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.tagline {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.1rem;
}

/* Accent line under hero name */
h1 span {
  display: inline;
  background: linear-gradient(90deg, var(--accent), #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section headings */
h2 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* Nav dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown-trigger {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  transition: color 0.15s;
}

.nav-dropdown-trigger:hover { color: var(--text); }

.nav-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s;
  display: inline-block;
  color: var(--accent);
}

.nav-dropdown-trigger[aria-expanded="true"] .nav-arrow { transform: rotate(180deg); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  list-style: none;
  overflow: hidden;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.nav-dropdown-menu.open { display: block; }

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  color: var(--text);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s, color 0.12s;
}

.nav-dropdown-menu li:last-child a { border-bottom: none; }

.nav-dropdown-menu a:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.nav-dropdown-item--wip {
  opacity: 0.45;
  pointer-events: none;
}

.wip-badge {
  font-size: 0.6rem;
  font-family: var(--mono);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 2px;
  margin-left: 0.5rem;
}

/* Project grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.project-card {
  background: var(--surface);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.15s;
}

.project-card:hover { background: var(--surface-2); }

.project-card p {
  font-size: 0.875rem;
  color: var(--muted);
  flex: 1;
}

.project-card--wip { opacity: 0.45; cursor: default; pointer-events: none; }

/* Tags */
.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-family: var(--mono);
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0.15em 0.5em;
  border-radius: 3px;
  margin-right: 0.3rem;
  margin-top: 0.5rem;
}

.tag--muted {
  color: var(--muted);
  background: transparent;
  border-color: var(--border);
}

/* About */
#about p {
  max-width: 60ch;
  color: var(--muted);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}
