/* CSS Variables for Theming */
:root {
  /* Light Theme Colors */
  --bg-color: #faf8f3;
  --text-main: #17140f;
  --text-secondary: #6e6a60;
  --divider-color: #e4dfd3;

  --accent-blue: #2f4cd1;
  --accent-green: #2f8f4e;
  --accent-rust: #b4623c;

  /* Typography */
  --font-main: "Archivo", sans-serif;
  --bg-hover: rgba(23, 20, 15, 0.03);
}

.dark-theme {
  /* Dark Theme Colors */
  --bg-color: #17140f;
  --text-main: #faf8f3;
  --text-secondary: #a39e93;
  --divider-color: #332f28;

  --accent-blue: #5c76f0;
  --accent-green: #4ec574;
  --accent-rust: #e0855a;

  --bg-hover: rgba(250, 248, 243, 0.05);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-main);
  font-weight: 500;
  line-height: 1.5;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  /* Subtle dot-grid texture */
  background-image: radial-gradient(var(--divider-color) 1px, transparent 1px);
  background-size: 24px 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* Typography Scale */
h1,
h2,
h3 {
  color: var(--text-main);
}

h1 {
  font-weight: 900;
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

h2 {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h3 {
  font-weight: 700;
  font-size: 1.5rem;
}

/* Accent Colors */
.accent-blue {
  color: var(--accent-blue);
}
.accent-green {
  color: var(--accent-green);
}
.rust-dash {
  color: var(--accent-rust);
  display: inline-block;
  margin-right: 0.5rem;
  font-weight: 900;
}

/* Layout Constraints */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
  border-bottom: 1px solid var(--divider-color);
}
.section:last-of-type {
  border-bottom: none;
}

/* Navbar */
.navbar {
  border-bottom: 1px solid var(--divider-color);
  padding: 1.5rem 2rem;
  position: sticky;
  top: 0;
  background-color: var(--bg-color);
  z-index: 100;
}

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

.logo {
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background-color: var(--text-main);
  transition: 0.3s;
}

.nav-mobile-overlay {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--divider-color);
  padding: 2rem;
}

.nav-mobile-overlay.active {
  display: block;
}

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.mobile-link {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Hero Section */
.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 8rem 0;
}
.hero-content {
  max-width: 800px;
}
.hero-subtitle {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 3rem;
  letter-spacing: -0.01em;
}
.hero-paragraph {
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1.4;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.hero-meta {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 4rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-actions {
  display: flex;
  gap: 2rem;
  align-items: center;
}

/* Buttons & Links */
.btn-primary {
  display: inline-block;
  background-color: var(--text-main);
  color: var(--bg-color);
  padding: 1rem 2rem;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--text-main);
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary:hover {
  background-color: transparent;
  color: var(--text-main);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.link-underline {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--text-main);
  padding-bottom: 0.25rem;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.link-underline:hover {
  color: var(--text-secondary);
  border-color: var(--text-secondary);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}
.section-label {
  margin-bottom: 2rem;
  color: var(--text-secondary);
}
.about-left p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-main);
}

.how-i-work-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--divider-color);
  font-size: 1.1rem;
}
.how-i-work-list li:first-child {
  border-top: 1px solid var(--divider-color);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
}

.skills-heading {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.skills-learning .skills-heading {
  color: var(--text-secondary);
}

.skills-list {
  display: flex;
  flex-direction: column;
}

.skills-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--divider-color);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-main);
}

.skills-list li:first-child {
  border-top: 1px solid var(--divider-color);
}

.skills-learning .skills-list li {
  color: var(--text-secondary);
}

/* Work Section */
.work-list {
  display: flex;
  flex-direction: column;
}
.work-row {
  display: flex;
  justify-content: space-between;
  padding: 3rem 0;
  border-bottom: 1px solid var(--divider-color);
  transition: background-color 0.3s;
}
.work-row:first-child {
  border-top: 1px solid var(--divider-color);
}
.work-row:hover {
  background-color: var(--bg-hover);
}
.work-info {
  display: flex;
  gap: 3rem;
  width: 100%;
}
.work-number {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.work-title {
  margin-bottom: 0.5rem;
}
.work-desc {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.work-tags {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.work-link {
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Journey Section */
.timeline {
  margin-left: 0.5rem;
  border-left: 1px solid var(--divider-color);
  padding-left: 2rem;
}
.timeline-item {
  position: relative;
  margin-bottom: 4rem;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-marker {
  position: absolute;
  left: -2.25rem;
  top: 0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--text-main);
  border-radius: 50%;
}
.timeline-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.timeline-role {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.timeline-desc {
  color: var(--text-secondary);
}

/* Contact Section */
.contact-container {
  max-width: 600px;
}
.contact-invitation {
  font-size: 1.5rem;
  margin-bottom: 3rem;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 4rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.form-group input,
.form-group textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--divider-color);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 1.1rem;
  padding: 0.5rem 0;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom-color: var(--text-main);
}
.error-message {
  color: var(--accent-rust);
  font-size: 0.85rem;
  min-height: 1.2rem;
}
.form-status {
  font-weight: 500;
  min-height: 1.5rem;
  transition: opacity 0.4s ease;
}
.status-success {
  color: var(--accent-green);
}
.status-error {
  color: var(--accent-rust);
}

.social-links {
  display: flex;
  gap: 3rem;
  border-top: 1px solid var(--divider-color);
  padding-top: 2rem;
}
.social-links a {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.social-links a:hover {
  color: var(--text-secondary);
}

/* Footer */
.footer {
  border-top: 1px solid var(--divider-color);
  padding: 1.5rem 2rem;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Accessibility: Focus outlines */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 4px;
}

/* Responsive Breakpoint (~860px) */
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }

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

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .work-info {
    width: 100%;
  }

  .hero-paragraph {
    font-size: 1.25rem;
  }

  main {
    padding: 0 1.5rem;
  }
  .section {
    padding: 4rem 0;
  }
}
