@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

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

/* ── Brand Tokens ────────────────────────── */
:root {
  /* Catppuccin Latte — warm */
  --bg:           #faf9f5;
  --surface:      #f0ece3;
  --surface-alt:  #e8e2d8;
  --border:       #e2ddd4;

  --text:         #4a4c60;
  --text-sub:     #6b6d80;
  --text-muted:   #9b9eb0;

  /* Accent palette */
  --lavender:     #8589c0;
  --blue:         #6b8fc4;
  --teal:         #6aa8a8;
  --sage:         #7ea882;
  --peach:        #d4906a;
  --rose:         #c48a8a;
  --marigold:     #c8a96e;

  --accent:       var(--lavender);
  --accent-deep:  #7275b0;

  --shadow-sm:    rgba(74, 76, 96, 0.07);
  --shadow-md:    rgba(74, 76, 96, 0.13);

  /* Typography */
  --font-heading: "Inter", Arial, sans-serif;
  --font-body:    "Lora", Georgia, serif;
  --font-mono:    "JetBrains Mono", monospace;
}

/* System dark preference */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #1e1e2e;
    --surface:      #313244;
    --surface-alt:  #3a3a52;
    --border:       #45475a;
    --text:         #cdd6f4;
    --text-sub:     #a6adc8;
    --text-muted:   #6c7086;
    --accent:       #b4befe;
    --accent-deep:  #cdd0ff;
    --shadow-sm:    rgba(0, 0, 0, 0.25);
    --shadow-md:    rgba(0, 0, 0, 0.4);
  }
}

/* Explicit overrides from toggle */
html.theme-light {
  --bg:           #faf9f5;
  --surface:      #f0ece3;
  --surface-alt:  #e8e2d8;
  --border:       #e2ddd4;
  --text:         #4a4c60;
  --text-sub:     #6b6d80;
  --text-muted:   #9b9eb0;
  --accent:       #8589c0;
  --accent-deep:  #7275b0;
  --shadow-sm:    rgba(74, 76, 96, 0.07);
  --shadow-md:    rgba(74, 76, 96, 0.13);
}

html.theme-dark {
  --bg:           #1e1e2e;
  --surface:      #313244;
  --surface-alt:  #3a3a52;
  --border:       #45475a;
  --text:         #cdd6f4;
  --text-sub:     #a6adc8;
  --text-muted:   #6c7086;
  --accent:       #b4befe;
  --accent-deep:  #cdd0ff;
  --shadow-sm:    rgba(0, 0, 0, 0.25);
  --shadow-md:    rgba(0, 0, 0, 0.4);
}

/* ── Base ────────────────────────────────── */
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

/* ── Page Layout ─────────────────────────── */
.page {
  max-width: 1020px;
  margin: 0 auto;
  padding: 52px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ── Topbar ──────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.07em;
  color: var(--text);
  text-transform: lowercase;
}

.location {
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.theme-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  padding: 5px 14px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--text);
  border-color: var(--accent);
  outline: none;
}

/* ── Hero ────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(200px, 0.85fr) minmax(300px, 1.15fr);
  gap: 32px;
  align-items: center;
  background: var(--surface);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow:
    0 2px 8px var(--shadow-sm),
    0 8px 28px var(--shadow-md);
}

/* Abstract brand artwork — dot-grid on gradient wash */
.hero-media {
  min-height: 300px;
  border-radius: 13px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(
      155deg,
      rgba(133, 137, 192, 0.20) 0%,
      rgba(107, 143, 196, 0.14) 28%,
      rgba(106, 168, 168, 0.16) 56%,
      rgba(200, 169, 110, 0.10) 78%,
      rgba(212, 144, 106, 0.08) 100%
    ),
    var(--surface-alt);
}

/* Signature dot-grid texture */
.hero-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 1.2px, transparent 1.2px);
  background-size: 16px 16px;
  opacity: 0.6;
}

/* Soft glow origin in corner */
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 25% 30%,
    rgba(133, 137, 192, 0.18) 0%,
    transparent 65%
  );
}

.profile-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 4px 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.68rem;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--accent);
  margin: 0;
}

h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.025em;
}

.subtitle {
  margin: 0;
  color: var(--text-sub);
  font-size: 0.98rem;
  line-height: 1.72;
  max-width: 460px;
}

.subtitle a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.subtitle a:hover {
  text-decoration-color: var(--accent);
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.primary-button {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #faf9f5;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.87rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background 0.2s;
}

@media (prefers-color-scheme: dark) {
  .primary-button { color: #1e1e2e; }
}

html.theme-dark .primary-button { color: #1e1e2e; }
html.theme-light .primary-button { color: #faf9f5; }

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--accent-deep);
}

.cta-hint {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Section divider ─────────────────────── */
.links {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ── Link Cards ──────────────────────────── */
.link-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 20px var(--shadow-md);
  color: var(--accent);
  outline: none;
}

.link-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: color 0.18s ease;
  flex-shrink: 0;
}

.link-card:hover .link-icon,
.link-card:focus-visible .link-icon {
  color: var(--accent);
}

.link-hint {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.55;
}

.link-card:hover .link-hint {
  color: var(--text-sub);
}

/* ── Footer ──────────────────────────────── */
.footer {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.025em;
}

/* ── Entrance Animation ──────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  animation: fadeInUp 0.35s ease both;
}

.links {
  animation: fadeInUp 0.35s ease 0.1s both;
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .links {
    animation: none;
  }
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-media {
    min-height: 180px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 36px 18px 56px;
    gap: 28px;
  }

  .hero {
    padding: 20px;
  }
}
