/* --- Root Dynamic Theme Palette --- */
[data-theme="dark"] {
  --bg-main: #0a0a0c;
  --bg-surface: #121216;
  --bg-card: #18181f;
  --bg-nav: rgba(10, 10, 12, 0.85);

  --text-main: #f1f1f3;
  --text-muted: #8e8ea0;
  --accent-serif: #ffffff;
  --accent-gold: #d4af37;
  --border: #23232c;

  --btn-bg: #f1f1f3;
  --btn-text: #0a0a0c;
  --btn-hover: #ffffff;
}

[data-theme="light"] {
  --bg-main: #ffffff;
  --bg-surface: #f8f9fa;
  --bg-card: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.85);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --accent-serif: #000000;
  --accent-gold: #b45309;
  --border: #e2e8f0;

  --btn-bg: #0f172a;
  --btn-text: #ffffff;
  --btn-hover: #1e293b;
}

:root {
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* --- Typography Helpers --- */
h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.italic-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-serif);
}

/* --- Layout Structure --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 7rem 0;
}

.border-top {
  border-top: 1px solid var(--border);
}

.bg-surface {
  background-color: var(--bg-surface);
  transition: background-color 0.3s ease;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

/* --- Navigation & Theme Toggle --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
  text-decoration: none;
}

.logo span {
  color: var(--accent-gold);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.theme-toggle:hover {
  background: var(--bg-surface);
}

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

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 0.85rem 1.75rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition:
    transform 0.2s,
    background 0.2s;
}

.btn-primary:hover {
  background: var(--btn-hover);
  transform: translateY(-2px);
}

.btn-primary-sm {
  background: var(--btn-bg);
  color: var(--btn-text) !important;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600 !important;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  color: var(--text-main);
  background: var(--bg-card);
  padding: 0.85rem 1.75rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.btn-secondary:hover {
  background: var(--bg-surface);
}

/* --- Hero Section Fixes (Left-Aligned) --- */
.hero {
  padding: 7rem 0 3rem; /* Reduced top padding from 12rem to 7rem */
  min-height: calc(100vh - 80px); /* Keeps hero balanced on screen height */
  display: flex;
  align-items: center;
}

.hero-container {
  max-width: 950px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: left; /* Strict left alignment */
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 1.25rem; /* Tightened space above title */
}

.hero-statement {
  font-size: 2.65rem; /* Slightly reduced font size so content fits above fold */
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero-subtext {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin-bottom: 1.75rem; /* Tightened space above buttons */
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-start; /* Keeps buttons aligned left */
}
/* --- Story & Timeline --- */
.sticky-col {
  position: sticky;
  top: 6rem;
  height: fit-content;
}

.section-tag {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.25rem;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  border-left: 2px solid var(--border);
  padding-left: 2rem;
}

.timeline-year {
  font-family: var(--font-mono);
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.timeline-item h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Projects --- */
.section-header {
  margin-bottom: 4rem;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background-color 0.3s;
}

.project-card:hover {
  border-color: var(--text-muted);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.project-title {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tags span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  color: var(--text-muted);
}

/* --- ACOB Showcase --- */
.acob-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4rem;
  transition: background-color 0.3s ease;
}

.badge-accent {
  background: rgba(180, 83, 9, 0.08);
  color: var(--accent-gold);
  border: 1px solid rgba(180, 83, 9, 0.2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.acob-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.acob-quote {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--accent-serif);
  border-left: 3px solid var(--accent-gold);
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
}

.acob-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

.acob-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Experience & Skills --- */
.skills-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-group h4 {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.skill-group p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.exp-item {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--border);
  padding-left: 1.25rem;
}

.exp-role {
  font-size: 1.1rem;
  font-weight: 600;
}

.exp-org {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.exp-time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.exp-item small {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Footer --- */
.footer {
  padding: 6rem 0 3rem;
}

.footer-heading {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.footer-main p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid var(--text-main);
  padding-bottom: 0.25rem;
  transition: opacity 0.2s;
}

.email-link:hover {
  opacity: 0.7;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  color: var(--text-muted);
  text-decoration: none;
}

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

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .sticky-col {
    position: static;
  }
  .hero-statement {
    font-size: 2.2rem;
  }
  .acob-wrapper {
    padding: 2rem;
  }
  .acob-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  .nav-links {
    display: flex;
    gap: 1rem;
  }
  .nav-links li:not(:last-child):not(:has(.theme-toggle)) {
    display: none;
  }
  /* --- Form Styling --- */
  .contact-form {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 2rem;
  }

  .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
  }

  .form-group label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
  }

  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    border-color: var(--text-muted);
  }

  .form-group select option {
    background: var(--bg-main);
    color: var(--text-main);
  }
}
