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

:root {
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --text: #f0f0f0;
  --text-muted: #888888;
  --accent: #ffffff;
  --border: #222222;
  --card-bg: #141414;
  --card-hover: #1a1a1a;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* NAV */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

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

.nav-github {
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.nav-github:hover {
  opacity: 1;
}

/* HERO */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 40px 80px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 20px;
  animation: bounce 2s infinite;
  opacity: 0.5;
  text-decoration: none;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

.hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  width: 100%;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.tagline {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--text-muted);
  font-weight: 300;
  font-style: italic;
  margin-bottom: 24px;
  line-height: 1.4;
}

.hero-bio {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-photo {
  flex-shrink: 0;
  width: 100px;
}

.hero-photo img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%);
  display: block;
}

/* BUTTONS */

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent);
  color: #000;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 3px;
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  opacity: 0.85;
}

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

.btn-outline:hover {
  border-color: var(--text-muted);
  opacity: 1;
}

/* SECTIONS */

.section {
  padding: 100px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-dark {
  background: var(--bg-alt);
  max-width: 100%;
  padding: 100px 40px;
}

.section-dark > * {
  max-width: 1020px;
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 48px;
  max-width: 600px;
}

/* WORK GRID */

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.work-item {
  background: var(--bg);
  padding: 36px 32px;
}

.work-item h3 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 12px;
}

.work-item p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* BUILT GRID */

.built-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.built-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s;
}

.built-card:hover:not(.no-link) {
  background: var(--card-hover);
  border-color: #333;
}

.built-card.no-link {
  cursor: default;
}

.built-card-inner {
  padding: 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 220px;
}

.built-tag {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.built-card h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.3;
}

.built-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.built-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.built-card:hover:not(.no-link) .built-link {
  color: var(--text);
}

/* FIT TOOL */

.fit-tool {
  max-width: 700px;
}

#jd-input {
  width: 100%;
  min-height: 200px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  padding: 20px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 16px;
  display: block;
}

#jd-input:focus {
  border-color: #444;
}

#jd-input::placeholder {
  color: var(--text-muted);
}

#fit-btn {
  font-family: 'Inter', sans-serif;
}

.fit-result {
  margin-top: 32px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px;
}

.fit-result.hidden {
  display: none;
}

.fit-result h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  margin-top: 24px;
}

.fit-result h3:first-child {
  margin-top: 0;
}

.fit-result p, .fit-result li {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.fit-result ul {
  padding-left: 20px;
}

.fit-result li {
  margin-bottom: 6px;
}

.fit-loading {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 16px;
}

.fit-strong { color: #5aff8a; }
.fit-growth { color: #ffd966; }
.fit-gap { color: #ff7070; }

.fit-cta {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-muted);
}

.fit-cta a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* CONTACT */

.contact-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* FOOTER */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* RESPONSIVE */

@media (max-width: 768px) {
  nav {
    padding: 16px 24px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .hero {
    padding: 100px 24px 80px;
    min-height: auto;
  }

  .hero-inner {
    flex-direction: column;
    gap: 24px;
  }

  .hero-photo {
    width: 72px;
  }

  .hero-photo img {
    width: 72px;
    height: 72px;
  }

  .section {
    padding: 48px 24px;
  }

  .section-dark {
    padding: 48px 24px;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .built-grid {
    grid-template-columns: 1fr;
  }
}
