/* ============================================================
   GLOBAL STYLES
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Mono:wght@300;400&display=swap');

:root {
  --cream:     #F5F0E8;
  --ink:       #1A1612;
  --warm-mid:  #8C7B6B;
  --accent:    #C0392B;
  --rule:      #D4C9B8;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-mono:  'DM Mono', 'Courier New', monospace;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1.75;
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }

p { max-width: 62ch; }

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

em { font-style: italic; }

/* ── Horizontal rule ── */
hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

/* ── Utility ── */
.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm-mid);
}

.accent { color: var(--accent); }

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--cream);
  border-bottom: 1px solid var(--rule);
  padding: 1.1rem 0;
  animation: fadeDown 0.6s ease both;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

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

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-mid);
  transition: color 0.2s;
}

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

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0;
  margin-top: 6rem;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p {
  font-size: 0.8rem;
  color: var(--warm-mid);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  max-width: none;
}

.footer-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm-mid);
  transition: color 0.2s;
}

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

/* ============================================================
   PAGE HEADER (shared section title style)
   ============================================================ */

.page-header {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 4rem;
  animation: fadeUp 0.7s ease both;
}

.page-header .mono {
  display: block;
  margin-bottom: 1rem;
}

.page-header h1 em {
  color: var(--warm-mid);
}

/* ============================================================
   INDEX — HERO
   ============================================================ */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 7rem 0 6rem;
  animation: fadeUp 0.8s ease both;
}

.hero-text .mono {
  display: block;
  margin-bottom: 1.5rem;
}

.hero-text h1 {
  margin-bottom: 1.5rem;
}

.hero-text p {
  font-size: 1.15rem;
  color: var(--warm-mid);
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 0.8em 2em;
  transition: background 0.2s, color 0.2s;
}

.hero-cta:hover {
  background: var(--ink);
  color: var(--cream);
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  filter: grayscale(20%);
}

/* decorative corner */
.hero-image::before {
  content: '';
  position: absolute;
  top: -1rem;
  right: -1rem;
  width: 60%;
  height: 60%;
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  pointer-events: none;
}

/* ── Highlights row ── */
.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 6rem;
  animation: fadeUp 0.9s 0.1s ease both;
}

.highlight-item {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--rule);
}

.highlight-item:last-child {
  border-right: none;
}

.highlight-item .number {
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.highlight-item p {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm-mid);
}

/* ── Recent work teaser ── */
.section-label {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.home-projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.project-card-sm {
  border: 1px solid var(--rule);
  padding: 2rem;
  transition: border-color 0.2s;
}

.project-card-sm:hover {
  border-color: var(--ink);
}

.project-card-sm .mono {
  display: block;
  margin-bottom: 0.8rem;
}

.project-card-sm h3 {
  margin-bottom: 0.6rem;
}

.project-card-sm p {
  font-size: 0.95rem;
  color: var(--warm-mid);
}

.view-all {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-mid);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s;
}

.view-all:hover { color: var(--ink); }

/* ============================================================
   ABOUT PAGE
   ============================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 5fr 3fr;
  gap: 6rem;
  align-items: start;
  margin-bottom: 5rem;
}

.about-bio h2 {
  margin-bottom: 1.5rem;
}

.about-bio p {
  margin-bottom: 1.2rem;
  color: var(--ink);
}

.about-sidebar {
  position: sticky;
  top: 6rem;
}

.about-photo {
  width: 100%;
  max-width: 250px;
  aspect-ratio: 1/1;
  display: block;
  margin-bottom: 1.5rem;
  filter: grayscale(15%);
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}

.sidebar-list li:first-child {
  border-top: 1px solid var(--rule);
}

.sidebar-list .label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm-mid);
  display: block;
  margin-bottom: 0.15rem;
}

/* ── Skills / areas ── */
.expertise-section {
  margin-bottom: 5rem;
}

.expertise-section h2 {
  margin-bottom: 2rem;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.expertise-item {
  background: var(--cream);
  padding: 1.8rem;
}

.expertise-item h4 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.expertise-item p {
  font-size: 0.88rem;
  color: var(--warm-mid);
}

/* ── CV download ── */
.cv-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--rule);
  padding: 2rem 2.5rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.cv-strip p {
  max-width: none;
  color: var(--warm-mid);
  font-size: 0.95rem;
}

.btn-outline {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 0.8em 2em;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--cream);
}

/* ============================================================
   PORTFOLIO PAGE
   ============================================================ */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 2.5rem;
  margin-bottom: 5rem;
}

.project-card {
  animation: fadeUp 0.6s ease both;
}

.project-card:nth-child(2) { animation-delay: 0.08s; }
.project-card:nth-child(3) { animation-delay: 0.16s; }
.project-card:nth-child(4) { animation-delay: 0.24s; }

.project-thumb {
  width: 100%;
  display: block;
  margin-bottom: 1.4rem;
  filter: grayscale(10%);
  transition: filter 0.3s;
}

.project-card:hover .project-thumb {
  filter: grayscale(0%);
}

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

.project-card h3 {
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.95rem;
  color: var(--warm-mid);
  margin-bottom: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.tag-list li {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  padding: 0.25em 0.7em;
  color: var(--warm-mid);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

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

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 4rem 0 3rem;
  }
  .hero-image { order: -1; }
  .hero-image img { aspect-ratio: 4/3; }

  .highlights { grid-template-columns: 1fr; }
  .highlight-item { border-right: none; border-bottom: 1px solid var(--rule); }
  .highlight-item:last-child { border-bottom: none; }

  .home-projects { grid-template-columns: 1fr; }

  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-sidebar { position: static; }

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

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

  .nav-links { gap: 1.5rem; }
}

@media (max-width: 500px) {
  .nav-links { display: none; }
}
