/* ========================================
   Custom Properties
   ======================================== */
:root {
  --color-accent: #2D5F3E;
  --color-accent-hover: #234A30;
  --color-cream: #F5EDE8;
  --color-cream-light: #FDF8F4;
  --color-text: #0A0A0A;
  --color-text-secondary: #666;
  --color-text-muted: #727272;
  --color-border: #E5E5E5;
  --color-white: #fff;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', -apple-system, sans-serif;

  --container-max: 1080px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

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

/* ========================================
   Container
   ======================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Header
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  gap: 32px;
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

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

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 32px;
  height: 32px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

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

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

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

/* ========================================
   Hero
   ======================================== */
.hero {
  padding: 80px 0 64px;
  background: var(--color-cream-light);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: center;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 20px;
}

.tagline {
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 560px;
  margin-bottom: 24px;
}

.mini-resume {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-resume li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 1.4;
}

.mini-resume-role {
  color: var(--color-text-secondary);
}

.mini-resume a {
  font-weight: 500;
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.mini-resume a:hover {
  text-decoration-color: var(--color-text);
}

.mini-resume-current {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-accent);
}

.hero-headshot {
  display: flex;
  justify-content: center;
}

.headshot {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  transform: rotate(2deg);
}

/* ========================================
   Section Headings
   ======================================== */
.section-heading {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-accent);
  margin-bottom: 40px;
}

/* ========================================
   Case Studies
   ======================================== */
.case-studies {
  padding: 64px 0 80px;
  background: var(--color-white);
}

/* Password Modal */
.password-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.password-overlay.open {
  display: flex;
}

.password-modal {
  background: var(--color-white);
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 460px;
  width: calc(100% - 48px);
  text-align: center;
  position: relative;
  animation: modalIn 0.2s ease-out;
}

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

.password-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.password-modal-close:hover {
  color: var(--color-text);
}

.password-gate-icon {
  color: var(--color-accent);
  margin-bottom: 16px;
}

.password-gate-icon svg {
  width: 32px;
  height: 32px;
}

.password-gate-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 12px;
}

.password-gate-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.password-gate-desc a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.password-gate-desc a:hover {
  color: var(--color-accent-hover);
}

.password-field {
  display: flex;
  gap: 8px;
  max-width: 320px;
  margin: 0 auto;
}

.password-field input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  background: var(--color-white);
  transition: border-color 0.2s;
}

.password-field input:focus {
  border-color: var(--color-accent);
}

.password-field button {
  padding: 12px 24px;
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.password-field button:hover {
  background: var(--color-accent-hover);
}

.password-error,
.password-success {
  font-size: 13px;
  margin-top: 14px;
  display: none;
}

.password-error {
  color: #c0392b;
}

.password-success {
  color: #27ae60;
}

.password-error.visible,
.password-success.visible {
  display: block;
}

/* Category Labels */
.category-label {
  display: block;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.case-study-category {
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
}

.category-label {
  grid-column: 1 / -1;
}

/* Case Study Cards */
.case-study-card {
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border);
}

.case-study-card h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.case-study-meta {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.case-study-meta a {
  color: var(--color-text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 2px;
}

.case-study-meta a:hover {
  color: var(--color-text);
}

.case-study-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin-bottom: 14px;
  max-width: 720px;
}

/* Title links: look like plain headings when locked, underline on hover when unlocked */
.case-study-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.case-study-title-link.locked {
  cursor: pointer;
  color: inherit;
}

.case-study-title-link.locked::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  vertical-align: middle;
  background: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.case-study-title-link.locked:hover {
  color: var(--color-accent);
}

.case-study-title-link.locked:hover::after {
  opacity: 0.6;
}

.case-study-title-link.unlocked {
  pointer-events: auto;
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
}

.case-study-title-link.unlocked:hover {
  text-decoration-color: var(--color-text);
}

/* ========================================
   Side Projects (Fret Not)
   ======================================== */
.side-projects {
  background: var(--color-cream-light);
  padding: 80px 0;
}

.fret-not-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
}

.app-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.app-header h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
}

.fret-not-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin-bottom: 28px;
}

.fretnot-button {
  display: inline-block;
  padding: 12px 24px;
  background: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.2s;
}

.fretnot-button:hover {
  background: var(--color-accent-hover);
}

.fret-not-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.fretnot-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.fretnot-link:hover {
  text-decoration-color: var(--color-accent);
}

.fret-not-screenshots {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: nowrap;
}

.phone-screenshot {
  width: 160px;
  flex-shrink: 0;
  overflow: hidden;
}

.phone-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   Resources
   ======================================== */
.resources {
  padding: 80px 0;
  background: var(--color-white);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.resource-card {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: border-color 0.2s;
  display: block;
}

.resource-card:hover {
  border-color: var(--color-accent);
}

.resource-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 10px;
  line-height: 1.3;
}

.resource-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

/* ========================================
   About
   ======================================== */
.about {
  background: var(--color-cream-light);
  padding: 80px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 48px;
  align-items: start;
}

.about-photo {
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.about-img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.about-text .section-heading {
  margin-bottom: 24px;
}

.about-text p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.about-text p:last-of-type {
  margin-bottom: 28px;
}

.about-email-button {
  display: inline-block;
  padding: 12px 24px;
  background: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.2s;
}

.about-email-button:hover {
  background: var(--color-accent-hover);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copyright {
  font-size: 13px;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

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

/* ========================================
   Responsive — Tablet (768px)
   ======================================== */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 40px;
  }

  .tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .mini-resume {
    align-items: center;
  }

  .hero-headshot {
    order: -1;
  }

  .headshot {
    width: 160px;
    height: 160px;
  }

  .case-study-category {
    grid-template-columns: 1fr;
  }

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

  .about-photo {
    position: static;
    max-width: 360px;
  }

  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fret-not-grid {
    grid-template-columns: 1fr;
  }

  .phone-screenshot {
    width: 0;
    flex: 1 1 0;
  }

  .hamburger {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
  }

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

/* ========================================
   Responsive — Mobile (480px)
   ======================================== */
@media (max-width: 480px) {
  .hero {
    padding: 48px 0 40px;
  }

  .hero-text h1 {
    font-size: 32px;
  }

  .tagline {
    font-size: 15px;
  }

  .section-heading {
    font-size: 28px;
    margin-bottom: 28px;
  }

  .case-study-card h3 {
    font-size: 22px;
  }

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

  .fret-not-screenshots {
    gap: 12px;
  }

  .linkedin-posts {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}
