/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Patina palette */
  --p50:  #F4F9F7;
  --p100: #DAEDE8;
  --p200: #B4DBD1;
  --p300: #87C1B4;
  --p400: #589A8D;
  --p500: #44887C;
  --p600: #356C63;
  --p700: #2D5852;
  --p800: #284743;
  --p900: #243D3A;
  --p950: #112220;

  /* Border radii */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-pill: 9999px;

  /* Transitions */
  --ease:        cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 150ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --t-base: 250ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --t-slow: 450ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ============================================================
   LIGHT MODE
   ============================================================ */
:root,
[data-theme="light"] {
  color-scheme: light;
  --bg:           #F4F9F7;
  --surface:      #FFFFFF;
  --surface-2:    #EEF6F3;
  --text-1:       #112220;
  --text-2:       #284743;
  --text-3:       #44887C;
  --accent:       #44887C;
  --accent-dark:  #356C63;
  --accent-dim:   rgba(68, 136, 124, 0.10);
  --accent-fg:    #FFFFFF;
  --border:       rgba(135, 193, 180, 0.30);
  --border-focus: rgba(68, 136, 124, 0.60);
  --nav-bg:       rgba(244, 249, 247, 0.80);
  --shadow-1:     0 1px 4px rgba(17, 34, 32, 0.07), 0 1px 2px rgba(17, 34, 32, 0.05);
  --shadow-2:     0 4px 20px rgba(17, 34, 32, 0.09), 0 2px 6px rgba(17, 34, 32, 0.06);
  --shadow-3:     0 12px 48px rgba(17, 34, 32, 0.11), 0 4px 16px rgba(17, 34, 32, 0.07);
  --hero-glow:    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(68,136,124,0.18) 0%, transparent 70%);
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  color-scheme: dark;
  --bg:           #112220;
  --surface:      #1C302C;
  --surface-2:    #243D3A;
  --text-1:       #F4F9F7;
  --text-2:       #B4DBD1;
  --text-3:       #87C1B4;
  --accent:       #589A8D;
  --accent-dark:  #44887C;
  --accent-dim:   rgba(88, 154, 141, 0.14);
  --accent-fg:    #112220;
  --border:       rgba(87, 193, 180, 0.11);
  --border-focus: rgba(88, 154, 141, 0.50);
  --nav-bg:       rgba(17, 34, 32, 0.85);
  --shadow-1:     0 1px 4px rgba(0, 0, 0, 0.28);
  --shadow-2:     0 4px 20px rgba(0, 0, 0, 0.32);
  --shadow-3:     0 12px 48px rgba(0, 0, 0, 0.42);
  --hero-glow:    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(88,154,141,0.22) 0%, transparent 70%);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--t-slow), color var(--t-slow);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul { list-style: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-sm {
  padding: 64px 0;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p {
  color: var(--text-2);
  line-height: 1.7;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  transition:
    background-color var(--t-base),
    backdrop-filter var(--t-base),
    -webkit-backdrop-filter var(--t-base),
    border-color var(--t-base),
    box-shadow var(--t-base);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background-color: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-1);
}

.nav-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-1);
  transition: color var(--t-fast);
  flex-shrink: 0;
}

.nav-brand:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  transition: color var(--t-fast), background-color var(--t-fast);
}

.nav-link:hover {
  color: var(--text-1);
  background-color: var(--accent-dim);
}

.nav-link.active {
  color: var(--accent);
  background-color: var(--accent-dim);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Theme toggle button */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: background-color var(--t-fast), color var(--t-fast);
}

.theme-toggle:hover {
  background-color: var(--accent-dim);
  color: var(--text-1);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.icon-sun, .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: block; }
[data-theme="dark"]  .icon-moon { display: block; }

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-2);
  transition: background-color var(--t-fast);
}

.nav-hamburger:hover { background-color: var(--accent-dim); }

.nav-hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-base), width var(--t-base);
  transform-origin: center;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile drawer */
.nav-mobile {
  position: fixed;
  inset: 64px 0 0 0;
  z-index: 99;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 16px 24px 32px;
  gap: 4px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base);
  border-top: 1px solid var(--border);
}

.nav-mobile.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-mobile-link {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 12px 16px;
  border-radius: var(--r-md);
  transition: color var(--t-fast), background-color var(--t-fast);
}

.nav-mobile-link:hover,
.nav-mobile-link.active {
  color: var(--accent);
  background-color: var(--accent-dim);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--r-pill);
  transition:
    background-color var(--t-fast),
    color var(--t-fast),
    box-shadow var(--t-fast),
    transform var(--t-fast);
  user-select: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-fg);
  box-shadow: var(--shadow-1);
}

.btn-primary:hover {
  background-color: var(--accent-dark);
  box-shadow: var(--shadow-2);
}

.btn-secondary {
  background-color: var(--accent-dim);
  color: var(--accent);
  border: 1px solid transparent;
}

.btn-secondary:hover {
  background-color: var(--surface-2);
  border-color: var(--border);
}

.btn-ghost {
  color: var(--text-2);
  border: 1px solid var(--border);
  background-color: var(--surface);
}

.btn-ghost:hover {
  color: var(--text-1);
  border-color: var(--border-focus);
  background-color: var(--surface-2);
  box-shadow: var(--shadow-1);
}

.btn-lg {
  font-size: 1.0625rem;
  padding: 15px 32px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-1);
  transition:
    box-shadow var(--t-base),
    transform var(--t-base),
    border-color var(--t-base);
}

.card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
  border-color: var(--border-focus);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background-color: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
  flex-shrink: 0;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.card h3 + p,
.card h3 ~ p {
  margin-top: 10px;
}

/* Gradient text utility — used on hero heading */
.gradient-text {
  background: linear-gradient(135deg, var(--text-1) 10%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 160px 0 96px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-glow);
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-heading {
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  color: var(--text-2);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
  margin-bottom: 56px;
}

.section-header .label {
  margin-bottom: 12px;
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-header p {
  max-width: 520px;
  font-size: 1.0625rem;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--t-base), transform var(--t-base), border-color var(--t-base);
}

.contact-card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
  border-color: var(--border-focus);
}

.contact-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background-color: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-card-icon svg { width: 22px; height: 22px; }

.contact-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}

.contact-card-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
}

/* Contact form */
.contact-form-wrap {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 48px;
  box-shadow: var(--shadow-2);
  margin-bottom: 64px;
}

.contact-form-wrap h3 {
  margin-bottom: 8px;
}

.contact-form-wrap > p {
  margin-bottom: 36px;
  font-size: 0.9375rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: -0.01em;
}

.form-field input,
.form-field textarea {
  background-color: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-1);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  width: 100%;
  resize: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-field textarea {
  min-height: 140px;
  line-height: 1.6;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-3);
  opacity: 0.7;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.form-status {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-3);
  min-height: 1.25em;
}

.form-status.success { color: var(--accent); }
.form-status.error   { color: #e05252; }

/* Resume download section */
.resume-section {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-1);
  flex-wrap: wrap;
}

.resume-section h3 { margin-bottom: 6px; }
.resume-section p  { font-size: 0.9375rem; }

/* ============================================================
   MERCH / UNDER CONSTRUCTION
   ============================================================ */
.construction-hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}

.construction-inner {
  max-width: 540px;
}

.construction-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--accent-dim);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  margin-bottom: 28px;
  border: 1px solid var(--border);
}

.construction-inner h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 18px;
}

.construction-inner p {
  font-size: 1.0625rem;
  color: var(--text-2);
  margin-bottom: 40px;
  line-height: 1.7;
}

/* Progress dots */
.construction-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.construction-dots span {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background-color: var(--accent);
  animation: pulse-dot 1.4s ease-in-out infinite;
}

.construction-dots span:nth-child(2) { animation-delay: 0.2s; opacity: 0.6; }
.construction-dots span:nth-child(3) { animation-delay: 0.4s; opacity: 0.35; }

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(0.6); opacity: 0.3; }
}

.construction-dots span:nth-child(2) { animation-delay: 0.2s; }
.construction-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer p {
  font-size: 0.875rem;
  color: var(--text-3);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-3);
  transition: color var(--t-fast);
}

.footer-links a:hover { color: var(--accent); }

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up:nth-child(2) { transition-delay: 80ms; }
.fade-up:nth-child(3) { transition-delay: 160ms; }
.fade-up:nth-child(4) { transition-delay: 240ms; }

/* ============================================================
   PAGE TRANSITION
   ============================================================ */
.page-transition {
  animation: pageEnter 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   UPDATES FEED
   ============================================================ */
.updates-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
}

.update-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--t-base), border-color var(--t-base);
}

.update-card:hover {
  box-shadow: var(--shadow-2);
  border-color: var(--border-focus);
}

.update-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.update-date {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-3);
}

.update-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--border);
}

.update-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 10px;
}

.update-body {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.75;
  white-space: pre-wrap;
}

.update-media {
  width: 100%;
  border-radius: var(--r-md);
  margin-top: 20px;
  object-fit: cover;
  max-height: 480px;
  border: 1px solid var(--border);
  display: block;
}

/* Skeleton shimmer */
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 32px;
}

.skeleton-line {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty / error states */
.updates-empty {
  padding: 72px 24px;
  text-align: center;
}

.updates-empty p {
  font-size: 0.9375rem;
  color: var(--text-3);
  margin-top: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .section { padding: 72px 0; }
  .hero { padding: 128px 0 72px; }

  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-methods { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .contact-form-wrap { padding: 28px 24px; }
  .resume-section { padding: 28px 24px; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .resume-section { flex-direction: column; align-items: flex-start; }
  .form-footer { flex-direction: column; align-items: flex-start; }
}
