/* ============================================
   ONLINE WRITING PORTFOLIO — style.css
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --bg:        #0b0f1a;
  --bg-card:   rgba(255, 255, 255, 0.04);
  --bg-card-h: rgba(255, 255, 255, 0.08);
  --border:    rgba(201, 168, 76, 0.18);
  --text:      #f0ece2;
  --muted:     #9a9489;
  --gold:      #c9a84c;
  --gold-light:#e8c96d;
  --serif:     'Playfair Display', Georgia, serif;
  --sans:      'Inter', system-ui, sans-serif;
  --radius:    12px;
  --max-w:     1100px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Typography ── */
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p  { color: var(--muted); font-size: 1rem; }

.section-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.75rem;
}

/* ── Layout ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }

section { padding: 6rem 0; }

/* ── Fade-in Animation ── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }
.fade-in:nth-child(5) { transition-delay: 0.4s; }
.fade-in:nth-child(6) { transition-delay: 0.5s; }

/* ================================================================
   NAVIGATION
   ================================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background var(--transition), box-shadow var(--transition);
}
nav.scrolled {
  background: rgba(11, 15, 26, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.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); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 26, 0.97);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--serif);
  font-size: 2rem;
  font-style: italic;
  color: var(--text);
  transition: color var(--transition);
}
.mobile-menu a:hover { color: var(--gold); }

/* ================================================================
   HERO
   ================================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 8rem 0 6rem;
  overflow: hidden;
}

/* Radial gradient accent */
#hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { max-width: 720px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.hero-eyebrow .line {
  display: block;
  width: 40px; height: 1px;
  background: var(--gold);
}
.hero-eyebrow span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-title { color: var(--text); margin-bottom: 1.25rem; }
.hero-title em { color: var(--gold); font-style: italic; }

.hero-sub {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 560px;
  margin-bottom: 2.5rem;
  color: var(--muted);
}

.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.scroll-indicator span {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-indicator .mouse {
  width: 22px; height: 34px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-indicator .mouse::before {
  content: '';
  width: 3px; height: 6px;
  background: var(--gold);
  border-radius: 2px;
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50%       { opacity: 0; transform: translateY(8px); }
}

/* ================================================================
   DIVIDER
   ================================================================ */
.divider {
  width: 100%; height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* ================================================================
   ABOUT
   ================================================================ */
#about { padding: 6rem 0; }

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 5rem;
  align-items: start;
}

.about-photo-wrap {
  position: relative;
}
.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(201,168,76,0.12), rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  overflow: hidden;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  cursor: pointer;
}
.about-photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(201,168,76,0.12), rgba(255,255,255,0.03));
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  gap: 0.75rem;
  text-align: center;
  padding: 1rem;
}
.about-photo-placeholder svg {
  width: 40px; height: 40px;
  opacity: 0.4;
}
.about-photo-wrap::before {
  content: '';
  position: absolute;
  inset: 10px -10px -10px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  z-index: -1;
}

.about-text h2 { margin-bottom: 1.25rem; color: var(--text); }
.about-text p  { margin-bottom: 1rem; }
.about-text p:last-of-type { margin-bottom: 1.75rem; }

.about-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat-item { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-num {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stat-label { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* ================================================================
   PORTFOLIO / WORK
   ================================================================ */
#work { padding: 6rem 0; }

.work-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.work-header h2 { color: var(--text); }
.view-all {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap var(--transition), color var(--transition);
}
.view-all:hover { gap: 0.75rem; color: var(--gold-light); }

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-tab {
  padding: 0.4rem 1.1rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  transition: all var(--transition);
}
.filter-tab.active,
.filter-tab:hover {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

/* Work grid */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.work-card {
  position: relative;
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: default;
}
.work-card:hover {
  background: var(--bg-card-h);
  border-color: rgba(201,168,76,0.4);
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(201,168,76,0.1);
}
.work-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.work-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,168,76,0.1);
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
}
.work-date { font-size: 0.78rem; color: var(--muted); }
.work-card h3 { color: var(--text); line-height: 1.35; transition: color var(--transition); }
.work-card:hover h3 { color: var(--gold-light); }
.work-card p { font-size: 0.9rem; flex: 1; }
.work-pub {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.work-pub-dot { width: 4px; height: 4px; background: var(--gold); border-radius: 50%; flex-shrink: 0; }
.work-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  transition: gap var(--transition);
  margin-top: auto;
}
.work-link:hover { gap: 0.75rem; }

/* ================================================================
   CONTACT
   ================================================================ */
#contact { padding: 6rem 0; }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: start;
}
.contact-left h2 { color: var(--text); margin-bottom: 1rem; }
.contact-left p  { margin-bottom: 1.75rem; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--gold);
  border-bottom: 1px solid rgba(201,168,76,0.3);
  padding-bottom: 0.2rem;
  transition: all var(--transition);
}
.contact-link:hover { color: var(--gold-light); border-color: var(--gold-light); }

/* Social links */
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}
.social-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all var(--transition);
}
.social-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,0.08);
  transform: translateY(-2px);
}
.social-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(154,148,137,0.5); }
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  background: rgba(201,168,76,0.04);
}
.form-group textarea { min-height: 120px; }

/* ================================================================
   FOOTER
   ================================================================ */
footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--gold);
}
.footer-copy { font-size: 0.78rem; color: var(--muted); }
.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.footer-links a {
  font-size: 0.78rem;
  color: var(--muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--gold); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 860px) {
  .about-grid  { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-photo-wrap { max-width: 280px; }
  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
  .work-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .work-grid { grid-template-columns: 1fr; }
  .btn-group  { flex-direction: column; }
  .btn { justify-content: center; }
  .about-stats { gap: 1.5rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  section { padding: 4rem 0; }
}
