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

/* ===== Custom Properties (Light Theme) ===== */
:root {
  --bg-primary: #FFFFFF;
  --bg-secondary: #FAFAF9;
  --bg-cards: #FAFAF9;
  --border: #E5E5E4;
  --accent-amber: #C98544;
  --accent-amber-hover: #B77536;
  --accent-blue: #3B6CA8;
  --text-primary: #1A1A1A;
  --text-secondary: #4A5568;
  --text-tertiary: #94A3B8;
  --photo-bg: #8A8080;
  --max-width: 800px;
  --max-width-wide: 960px;
  --nav-height: 64px;
}

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-amber);
}

/* Inline link styles */
p a, li a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--text-tertiary);
  transition: color 0.2s, text-decoration-color 0.2s;
}

p a:hover, li a:hover {
  text-decoration-color: var(--accent-amber);
}

ul, ol {
  list-style: none;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide {
  max-width: var(--max-width-wide);
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ===== Nav ===== */
nav {
  padding: 1rem 0;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width-wide);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  text-decoration: none;
}

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

.nav-photo-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: inline-block;
  line-height: 0;
  background-color: var(--photo-bg);
}

.nav-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

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

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

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent-amber);
  border-radius: 1px;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background-color: var(--accent-amber);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(201, 133, 68, 0.2);
}

.btn--primary:hover {
  background-color: var(--accent-amber-hover);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(201, 133, 68, 0.3);
}

.btn--outline {
  background-color: transparent;
  color: var(--accent-amber);
  border: 1.5px solid var(--accent-amber);
}

.btn--outline:hover {
  background-color: var(--accent-amber);
  color: #FFFFFF;
}

/* ===== Cards ===== */
.card {
  background-color: var(--bg-cards);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent-amber);
  border-radius: 10px;
  padding: 1.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.card h3 {
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ===== Tags ===== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  background-color: rgba(59, 108, 168, 0.08);
  color: var(--accent-blue);
}

/* ===== Hero ===== */
.hero {
  padding: 5rem 0 3.5rem;
}

.hero__title {
  font-size: 3rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--accent-amber);
  margin-bottom: 1.5rem;
}

.hero__tagline {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* ===== Grid: What I do ===== */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* ===== Project cards ===== */
.project-card {
  background-color: var(--bg-cards);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-amber);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.project-card__company {
  font-size: 0.875rem;
  color: var(--accent-amber);
  font-weight: 600;
}

.project-card__period {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.project-card__oneliner {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.project-card__details {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== CTA Strip ===== */
.cta-strip {
  text-align: center;
  padding: 4.5rem 0;
}

.cta-strip h2 {
  color: var(--text-primary);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

/* ===== Page header ===== */
.page-header {
  padding: 4rem 0 1.5rem;
}

.page-header h1 {
  margin-bottom: 0.75rem;
}

.page-header p {
  font-size: 1.0625rem;
}

/* ===== About sections ===== */
.about-intro {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.about-photo {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 3px solid var(--accent-amber);
  background-color: var(--photo-bg);
}

.about-intro-text p {
  margin-bottom: 0;
}

.about-section {
  margin-bottom: 3rem;
}

.about-section h2 {
  color: var(--accent-amber);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.about-section ul {
  list-style: none;
  padding: 0;
}

.about-section ul li {
  color: var(--text-secondary);
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.about-section ul li::before {
  content: '\2022';
  color: var(--accent-amber);
  position: absolute;
  left: 0;
}

.about-cross-ref {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ===== Contact ===== */
.contact-content {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.contact-content p {
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

/* ===== Contact hero image ===== */
.contact-hero {
  margin-bottom: 2.5rem;
  border-radius: 12px;
  overflow: hidden;
}

.contact-hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Writing placeholder ===== */
.writing-placeholder {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 3rem 0;
}

.writing-placeholder p {
  font-size: 1.0625rem;
  line-height: 1.8;
}

/* ===== Footer ===== */
footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--max-width-wide);
}

.footer-name {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

.footer-links a {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  transition: color 0.2s;
  text-decoration: none;
}

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

/* ===== Scroll Animations ===== */
.js-ready [data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-ready [data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

.js-ready .grid-3 [data-animate]:nth-child(2) {
  transition-delay: 0.1s;
}

.js-ready .grid-3 [data-animate]:nth-child(3) {
  transition-delay: 0.2s;
}

/* ===== Responsive ===== */
@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero__title {
    font-size: 3rem;
  }
}

@media (max-width: 639px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    z-index: 100;
  }

  .nav-links.open {
    display: flex;
  }

  nav .container {
    position: relative;
  }

  .hero {
    padding: 3rem 0 2rem;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .section {
    padding: 3rem 0;
  }

  .project-card {
    padding: 1.5rem;
  }

  .about-intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-photo {
    width: 120px;
    height: 120px;
  }

  footer .container {
    flex-direction: column;
    text-align: center;
  }
}
