/* ═══════════════════════════════════════
   HackPotion — Global Styles
   ═══════════════════════════════════════ */

:root {
  --cream: #FAF7F2;
  --warm-white: #FFFDF9;
  --ink: #1A1A1A;
  --ink-light: #3D3D3D;
  --ink-muted: #6B6360;
  --accent: #8B6F5C;
  --accent-light: #C4A98E;
  --accent-hover: #705847;
  --border: #E8E0D8;
  --border-light: #F0EBE5;
  --sage: #7A8B7A;
  --sage-light: #E8EDE8;
  --section-alt: #F5F1EB;
  --history-accent: #6B7B8D;
  --history-accent-light: #A3B1BF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Cormorant Garamond', serif; font-weight: 400; }
a { color: inherit; }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow 0.4s ease;
}

nav.scrolled { box-shadow: 0 1px 20px rgba(0,0,0,0.04); }

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.nav-links a.nav-accent { color: var(--history-accent); }
.nav-links a.nav-accent::after { background: var(--history-accent); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after { width: 100%; }

/* Mobile nav */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  z-index: 200;
}

.mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.mobile-toggle span:nth-child(1) { top: 0; }
.mobile-toggle span:nth-child(2) { top: 9px; }
.mobile-toggle span:nth-child(3) { top: 18px; }

.mobile-toggle.active span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.3s ease;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
  border: 1.5px solid var(--ink);
}

.btn-primary:hover {
  background: var(--ink-light);
  border-color: var(--ink-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

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

.btn-outline:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10rem 2rem 8rem;
  position: relative;
  overflow: hidden;
}

.hero-bg-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-bg-1 {
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(196, 169, 142, 0.12) 0%, transparent 70%);
}

.hero-bg-2 {
  bottom: -10%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(122, 139, 122, 0.08) 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4rem;
  text-align: left;
}

.hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-image {
  flex-shrink: 0;
  width: 320px;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  box-shadow: 0 8px 40px rgba(90, 60, 40, 0.18), 0 2px 12px rgba(90, 60, 40, 0.10);
}

.hero-label {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero h1 {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--ink-light);
  max-width: 520px;
  margin: 0 0 2.5rem;
  line-height: 1.8;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 1s forwards;
}

/* ─── SECTIONS (shared) ─── */
section { padding: 6rem 2rem; }

.section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.section-divider {
  width: 40px;
  height: 1.5px;
  background: var(--accent-light);
  margin-bottom: 2rem;
}

/* ─── PILLARS (homepage) ─── */
.pillars { background: var(--warm-white); }

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.pillar-card {
  background: var(--cream);
  border: 1px solid var(--border-light);
  padding: 2.5rem 2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.pillar-card:hover {
  border-color: var(--border);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.04);
}

.pillar-card-alt {
  background: var(--section-alt);
}

.pillar-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.pillar-icon svg { width: 100%; height: 100%; }

.pillar-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.pillar-card p {
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.pillar-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
}

/* ─── FEATURED (homepage) ─── */
.featured { background: var(--cream); }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.featured-card {
  padding: 2rem;
  background: var(--warm-white);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.featured-card:hover {
  border-color: var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.featured-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-light);
  padding: 0.25rem 0.7rem;
  border-radius: 2px;
  margin-bottom: 1rem;
}

.featured-card h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.featured-card p {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.featured-meta {
  font-size: 0.78rem;
  color: var(--accent-light);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ─── CTA SECTION ─── */
.cta-section {
  background: var(--section-alt);
  text-align: center;
}

.cta-inner p {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

/* ─── PAGE HERO (subpages) ─── */
.page-hero {
  padding: 10rem 2rem 4rem;
  text-align: center;
  background: var(--cream);
}

.page-hero .section-label { margin-bottom: 1rem; }

.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 1.1rem;
  color: var(--ink-muted);
  max-width: 550px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ─── ABOUT PAGE ─── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.about-photo {
  width: 100%;
  border-radius: 2px;
}

.photo-placeholder {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: var(--ink-muted);
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

.about-text p {
  color: var(--ink-light);
  margin-bottom: 1.2rem;
  font-size: 1rem;
  line-height: 1.85;
}

.credential-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.credential-tag {
  padding: 0.45rem 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--ink-muted);
  background: var(--cream);
}

/* ─── CONTENT PAGE ─── */
.social-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-light);
  transition: all 0.3s ease;
}

.social-link:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
}

.social-link svg { width: 18px; height: 18px; }

.content-series {
  margin-top: 2rem;
}

.series-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-light);
}

.series-item:last-child { border-bottom: none; }

.series-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.series-item h3 {
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.series-item p {
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

/* ─── EDUCATION PAGE ─── */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.edu-card {
  background: var(--warm-white);
  border: 1px solid var(--border-light);
  padding: 2.2rem 2rem;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.edu-card:hover {
  border-color: var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.edu-card-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  margin-bottom: 1rem;
}

.edu-card-tag.cyber { color: var(--sage); border: 1px solid var(--sage-light); }
.edu-card-tag.ai { color: var(--accent); border: 1px solid var(--accent-light); }
.edu-card-tag.tech { color: var(--history-accent); border: 1px solid var(--history-accent-light); }

.edu-card h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.edu-card p {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

.edu-card .status {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-light);
}

/* ─── HISTORY PAGE ─── */
.history-hero {
  background: var(--section-alt);
}

.history-hero .section-label { color: var(--history-accent); }

.history-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.history-card {
  background: var(--warm-white);
  border: 1px solid var(--border-light);
  padding: 2.2rem 2rem;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.history-card:hover {
  border-color: var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.history-card .series-tag { color: var(--history-accent); }

.history-card h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.history-card p {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

/* ─── CONTACT PAGE ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-text p {
  font-size: 1rem;
  color: var(--ink-light);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-method:hover {
  border-color: var(--border);
  transform: translateX(4px);
}

.contact-method svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-method-info h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.contact-method-info p {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--warm-white);
  transition: border-color 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

/* ─── FOOTER ─── */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  margin-bottom: 1.5rem;
}

.footer-brand .nav-logo {
  color: var(--cream);
  font-size: 1.2rem;
}

.footer-brand p {
  font-size: 0.82rem;
  color: rgba(250, 247, 242, 0.5);
  margin-top: 0.3rem;
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.5);
  transition: color 0.3s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(250, 247, 242, 0.1);
  padding-top: 1.5rem;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(250, 247, 242, 0.35);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .mobile-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--cream);
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    box-shadow: -4px 0 30px rgba(0,0,0,0.05);
  }

  .nav-links.open { right: 0; }

  .hero { min-height: 90vh; padding: 8rem 1.5rem 5rem; }
  .hero h1 { font-size: clamp(2.8rem, 10vw, 4rem); }
  .hero-content { flex-direction: column; text-align: center; gap: 2rem; }
  .hero-image { width: 220px; max-height: none; }
  .hero-image img { max-height: none; }
  .hero-description { margin: 0 auto 2.5rem; }

  .pillars-grid,
  .featured-grid,
  .edu-grid,
  .history-grid {
    grid-template-columns: 1fr;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-cta { flex-direction: column; align-items: center; }

  .social-links { flex-direction: column; }

  .footer-links { flex-wrap: wrap; gap: 1rem; }

  .page-hero { padding: 8rem 1.5rem 3rem; }
}
