/* ================================================================
   style.css — Joy Dey Portfolio
   Inspired by paulstamatiou.com editorial aesthetic:
   – Off-white background, dark typography
   – DM Serif Display headings, DM Sans body
   – Minimal nav, generous whitespace, clean grid
   – Subtle borders, no loud decorations
   ================================================================ */

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

/* ── DESIGN TOKENS ───────────────────────────────────────────── */
:root {
  --bg:          #f5f2ed;       /* warm off-white, like Paul's site */
  --bg-alt:      #edeae4;       /* slightly darker off-white */
  --surface:     #ffffff;
  --ink:         #1a1916;       /* near-black, warm toned */
  --ink-light:   #5a5652;       /* secondary text */
  --ink-muted:   #9c9790;       /* placeholders, timestamps */
  --accent:      #d4552a;       /* rust/burnt orange accent */
  --accent-light:#f0e4dc;
  --border:      #dedad4;
  --radius:      6px;
  --radius-lg:   12px;

  /* Typography */
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, -apple-system, sans-serif;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;

  /* Layout */
  --max-w: 1100px;
  --col-gap: 2.5rem;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 220ms;
}

/* ── BASE ─────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1,h2,h3,h4 {
  font-family: var(--font-serif);
  line-height: 1.15;
  font-weight: 400;
}

p { max-width: 68ch; }

ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

/* ── NAVIGATION ──────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 242, 237, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.nav.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.06); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: var(--sp-4) var(--sp-6);
}

.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color var(--dur);
}
.nav__logo:hover { color: var(--accent); }

.nav__links {
  display: flex;
  gap: var(--sp-8);
  list-style: none;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-light);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color var(--dur);
  padding-block: var(--sp-1);
  border-bottom: 2px solid transparent;
}
.nav__links a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* Burger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--dur), opacity var(--dur);
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  padding: var(--sp-24) 0 var(--sp-16);
  border-bottom: 1px solid var(--border);
}

.hero__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-6);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-16);
  align-items: center;
}

.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}

.hero__title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  color: var(--ink);
  margin-bottom: var(--sp-6);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.hero__bio {
  font-size: 1.125rem;
  color: var(--ink-light);
  line-height: 1.75;
  margin-bottom: var(--sp-8);
  max-width: 52ch;
}
.hero__bio strong { color: var(--ink); font-weight: 600; }

.hero__actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* Portrait */
.hero__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  flex-shrink: 0;
}

.hero__img-wrap {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  background: var(--bg-alt);
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__badge {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-light);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: var(--sp-1) var(--sp-3);
}

.badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--dur) var(--ease);
  letter-spacing: 0.02em;
}

.btn--dark {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn--dark:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--ink);
  background: rgba(0,0,0,0.04);
}

/* ── MARQUEE ─────────────────────────────────────────────────── */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-block: var(--sp-3);
  background: var(--bg-alt);
}

.marquee__track {
  display: flex;
  gap: var(--sp-6);
  width: max-content;
  animation: scroll-left 22s linear infinite;
}

.marquee__track span {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── SECTIONS ────────────────────────────────────────────────── */
.section { padding: var(--sp-24) 0; border-bottom: 1px solid var(--border); }

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-12);
  gap: var(--sp-4);
}

.section__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.see-all {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: gap var(--dur);
}
.see-all:hover { text-decoration: underline; }

/* ── ABOUT ────────────────────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--col-gap);
  align-items: start;
}

.about__left { padding-top: var(--sp-2); }
.about__left .section__title { margin-bottom: var(--sp-6); }
.about__left p {
  color: var(--ink-light);
  margin-bottom: var(--sp-4);
  font-size: 1.05rem;
  line-height: 1.75;
}
.about__left p strong { color: var(--ink); }

.about__photo-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  margin-bottom: var(--sp-6);
}

.about__photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__facts {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.about__facts li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}
.about__facts li:last-child { border-bottom: none; }

.fact__label {
  font-weight: 600;
  color: var(--ink-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status--open {
  color: #16a34a;
  font-weight: 600;
  font-size: 0.8rem;
}

/* ── WRITING (POST LIST) ─────────────────────────────────────── */
.writing { background: var(--bg); }

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

.post-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--sp-8);
  padding: var(--sp-8) 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--dur);
}
.post-item:first-child { padding-top: 0; }
.post-item:last-child { border-bottom: none; }

.post-item__date {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 500;
  padding-top: 0.25rem;
  white-space: nowrap;
}

.post-item__title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin-bottom: var(--sp-2);
  line-height: 1.2;
}
.post-item__title a {
  color: var(--ink);
  text-decoration: none;
  transition: color var(--dur);
}
.post-item__title a:hover { color: var(--accent); }

.post-item__excerpt {
  font-size: 0.925rem;
  color: var(--ink-light);
  line-height: 1.65;
  max-width: 62ch;
}

/* ── PROJECTS ────────────────────────────────────────────────── */
.projects { background: var(--bg-alt); }

.projects__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-6);
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.project-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.project-card--featured { grid-column: span 7; }
.project-card:not(.project-card--featured) { grid-column: span 5; }

.project-card__img-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-alt);
}

.project-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}
.project-card:hover .project-card__img { transform: scale(1.03); }

.project-card__body { padding: var(--sp-6); }

.project-card__meta {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
}

.project-card__title {
  font-size: 1.35rem;
  margin-bottom: var(--sp-3);
  color: var(--ink);
}

.project-card__desc {
  font-size: 0.925rem;
  color: var(--ink-light);
  line-height: 1.65;
  margin-bottom: var(--sp-4);
}

.project-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: gap var(--dur);
}
.project-link:hover { text-decoration: underline; }

/* ── SKILLS ──────────────────────────────────────────────────── */
.skills { background: var(--bg); }

.skills .section__title { margin-bottom: var(--sp-12); }

.skills__groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-8);
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
}

.skill-group__label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}

.skill-group ul { list-style: none; }
.skill-group li {
  font-size: 0.9rem;
  color: var(--ink-light);
  padding-block: var(--sp-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.skill-group li:last-child { border-bottom: none; }
.skill-group li::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── CONTACT ─────────────────────────────────────────────────── */
.contact { background: var(--bg-alt); }

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--col-gap);
  align-items: start;
}

.contact__left .section__title { margin-bottom: var(--sp-4); }

.contact__left p {
  color: var(--ink-light);
  margin-bottom: var(--sp-8);
  font-size: 1.05rem;
  line-height: 1.75;
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.contact__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-light);
  text-decoration: none;
  transition: color var(--dur);
}
.contact__link:hover { color: var(--accent); }
.contact__link svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Form */
.contact__form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
}

.form-group { margin-bottom: var(--sp-4); }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--sp-2);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-sans);
  font-size: 0.925rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--dur);
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--ink-muted); }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form__status {
  margin-top: var(--sp-3);
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 1.4em;
}
.form__status.success { color: #16a34a; }
.form__status.error   { color: #dc2626; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer {
  padding: var(--sp-12) 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--sp-4);
}

.footer__name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink);
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-align: center;
}

.footer__nav {
  display: flex;
  gap: var(--sp-6);
  justify-content: flex-end;
  flex-wrap: wrap;
}

.footer__nav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--dur);
  white-space: nowrap;
}
.footer__nav a:hover { color: var(--accent); }

/* ── SVG PORTRAITS / PLACEHOLDERS ────────────────────────────── */
/* Handled inline via SVG files */

/* ── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  animation: fade-up 0.65s var(--ease) forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.35s; }

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-12);
  }
  .hero__visual { flex-direction: row; justify-content: flex-start; }
  .hero__img-wrap { width: 140px; height: 140px; }

  .project-card--featured,
  .project-card:not(.project-card--featured) {
    grid-column: span 12;
  }

  .about__grid { grid-template-columns: 1fr; }
  .about__right { order: -1; }
  .about__photo-frame { aspect-ratio: 3/2; max-height: 280px; }

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

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer__nav { justify-content: center; }
}

@media (max-width: 640px) {
  :root { --sp-24: 4rem; }

  .badge__company {
    display: block;
  }

  .nav.open {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 15vh;
    gap: var(--sp-8);
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
    z-index: 99;
    border-top: 1px solid var(--border);
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a { font-size: 1.25rem; }

  .nav__burger { display: flex; }

  .hero__title { font-size: 2.5rem; }

  .post-item {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }
  .post-item__date { padding-top: 0; }

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

  .section__header { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
}
