/* ============================================
   shehacks.it — Dark Gothic Green (refreshed)
   ============================================ */

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

:root {
  /* Backgrounds — layered for depth */
  --bg-deep:        #070a07;
  --bg-primary:     #0c100c;
  --bg-card:        #0f150f;
  --bg-card-hover:  #141c14;
  --bg-elevated:    #182218;

  /* Greens — muted base, one phosphor accent used sparingly */
  --green-phosphor: #7ee787;
  --green-bright:   #4fa84f;
  --green-accent:   #3a7a3a;
  --green-glow:     #2d5a2d;
  --green-muted:    #2a4a2a;
  --green-dim:      #1a2e1a;

  /* Text */
  --text-primary:   #c4cdc4;
  --text-secondary: #8c968c;
  --text-dim:       #5c685c;
  --text-bright:    #dce5dc;
  --text-heading:   #e6eee6;

  /* Lines & glows */
  --border:         #1d291d;
  --border-strong:  #2a3d2a;
  --border-glow:    rgba(126, 231, 135, 0.16);

  --shadow-card:    0 1px 0 rgba(255,255,255,0.015), 0 14px 34px -18px rgba(0,0,0,0.8);
  --shadow-glow:    0 0 0 1px var(--border-glow), 0 22px 55px -22px rgba(45,90,45,0.6);

  --font-display:   'Cinzel', Georgia, serif;
  --font-body:      'Crimson Pro', Georgia, serif;
  --font-mono:      'JetBrains Mono', monospace;

  --max-width:      1100px;
  --nav-height:     64px;
  --ease:           cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--green-glow) var(--bg-deep);
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-primary);
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, #101a10 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 100% 0%, #0d140d 0%, transparent 55%),
    var(--bg-deep);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--green-glow);
  color: var(--text-bright);
}

a {
  color: var(--green-bright);
  text-decoration: none;
  transition: color 0.3s var(--ease), text-shadow 0.3s var(--ease);
}
a:hover {
  color: var(--green-phosphor);
  text-shadow: 0 0 14px rgba(126, 231, 135, 0.35);
}

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

:focus-visible {
  outline: 2px solid var(--green-phosphor);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Noise Overlay ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 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;
  mix-blend-mode: overlay;
}

/* ---- Navigation ---- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(7, 10, 7, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-heading);
  letter-spacing: 0.08em;
  transition: text-shadow 0.3s var(--ease);
}
.nav-logo:hover { text-shadow: none; }
.nav-logo span {
  color: var(--green-bright);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--green-bright), var(--green-phosphor));
  transition: width 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text-bright);
  text-shadow: none;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s var(--ease);
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(7, 10, 7, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 1.5rem 2rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform 0.35s var(--ease);
  }
  .nav-links.open {
    transform: translateY(0);
  }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: brightness(0.4) saturate(0.6) hue-rotate(80deg);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 0%, var(--bg-deep) 78%),
    linear-gradient(180deg, rgba(7,10,7,0.4) 0%, transparent 35%, transparent 55%, var(--bg-deep) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 2rem;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
  text-shadow: 0 2px 40px rgba(45, 90, 45, 0.4);
  animation: fadeUp 1s var(--ease) forwards;
  opacity: 0;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 2vw, 1rem);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 2.2rem;
  animation: fadeUp 1s 0.2s var(--ease) forwards;
  opacity: 0;
}

.hero-tagline .sep {
  display: inline-block;
  margin: 0 0.6rem;
  color: var(--green-accent);
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  animation: fadeUp 1s 0.4s var(--ease) forwards;
  opacity: 0;
}
.hero-cta a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.8rem 2rem;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  transition: all 0.3s var(--ease);
}
.hero-cta a:hover {
  border-color: var(--green-glow);
  background: rgba(45, 90, 45, 0.15);
  color: var(--text-bright);
  text-shadow: none;
  box-shadow: 0 0 24px -6px var(--border-glow);
  transform: translateY(-1px);
}
.hero-cta a.primary {
  background: linear-gradient(135deg, var(--green-glow), var(--green-accent));
  border-color: var(--green-accent);
  color: var(--text-bright);
}
.hero-cta a.primary:hover {
  background: linear-gradient(135deg, var(--green-accent), var(--green-bright));
}

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

/* ---- Scroll indicator ---- */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: fadeUp 1s 0.8s var(--ease) forwards, float 3s 1.8s ease-in-out infinite;
  opacity: 0;
}
.scroll-indicator svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-dim);
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ---- Section Layout ---- */
.section {
  padding: 6rem 2rem;
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--green-bright);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-label::before {
  content: '';
  width: 1.6rem;
  height: 1px;
  background: linear-gradient(90deg, var(--green-accent), transparent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 3rem;
  font-weight: 300;
}

/* ---- About / Skills ---- */
.about-narrative {
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--text-primary);
  max-width: 720px;
  margin-bottom: 3rem;
}
.about-narrative strong {
  color: var(--text-bright);
  font-weight: 600;
}

.stats-row {
  display: flex;
  gap: 3.5rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}
.stat {
  text-align: left;
  position: relative;
  padding-left: 1.1rem;
}
.stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  background: linear-gradient(180deg, var(--green-phosphor), var(--green-glow));
  border-radius: 2px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--green-bright);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.9rem;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green-accent), var(--green-phosphor));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.skill-card:hover {
  border-color: var(--green-glow);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}
.skill-card:hover::before { transform: scaleX(1); }
.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.6rem;
  letter-spacing: 0.04em;
}
.skill-card p {
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ---- Cards (Blog, Projects, Reads) ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
  display: flex;
  flex-direction: column;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green-accent), var(--green-phosphor));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.card:hover {
  border-color: var(--green-glow);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}
.card:hover::before { transform: scaleX(1); }

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--green-bright);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--green-bright);
  margin-top: 1.3rem;
  letter-spacing: 0.05em;
}
.card-link:hover {
  color: var(--green-phosphor);
  text-shadow: none;
}
.card-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s var(--ease);
}
.card-link:hover svg {
  transform: translateX(4px);
}

.card-date {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

/* ---- Blog Post Layout ---- */
.post-header {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 2rem;
  text-align: center;
}
.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: 0.03em;
  max-width: 800px;
  margin: 0 auto 1rem;
  line-height: 1.25;
}
.post-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.post-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 2rem 6rem;
}
.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 2.5rem 0 1rem;
  letter-spacing: 0.03em;
}
.post-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 2rem 0 0.75rem;
}
.post-content p {
  margin-bottom: 1.2rem;
}
.post-content ul, .post-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}
.post-content li {
  margin-bottom: 0.5rem;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-elevated);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--green-phosphor);
}
.post-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  line-height: 1.6;
  border-radius: 4px;
}
.post-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}
.post-content blockquote {
  border-left: 3px solid var(--green-glow);
  padding: 0.5rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}
.post-content a {
  border-bottom: 1px solid var(--green-dim);
}
.post-content a:hover {
  border-bottom-color: var(--green-phosphor);
}
.post-content img {
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  border-radius: 4px;
}

/* ---- Reads ---- */
.read-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.read-card .read-cover {
  width: 80px;
  min-width: 80px;
  height: 120px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border-radius: 3px;
}
.read-card .read-info { flex: 1; }
.read-card .read-info h3 { margin-bottom: 0.3rem; }
.read-card .read-author {
  font-size: 0.9rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 0.5rem;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(7,10,7,0.6));
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.footer-links a:hover {
  color: var(--green-phosphor);
}
.footer-copy {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ---- Page Header (for sub-pages) ---- */
.page-header {
  position: relative;
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 2rem;
  padding-left: 2rem;
  padding-right: 2rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(45,90,45,0.12), transparent 70%);
}
.page-header .section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ---- Divider ---- */
.section-divider {
  width: 60px;
  height: 1px;
  background: var(--green-glow);
  margin: 0 auto 4rem;
}

/* ---- Talks / Video Cards ---- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.video-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.video-card:hover {
  border-color: var(--green-glow);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
  text-shadow: none;
}

.video-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: var(--bg-elevated);
}
.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72) saturate(0.62) hue-rotate(80deg);
  transition: filter 0.4s var(--ease), transform 0.5s var(--ease);
}
.video-card:hover .video-thumb img {
  filter: brightness(0.95) saturate(0.8) hue-rotate(80deg);
  transform: scale(1.04);
}
.video-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(7,10,7,0.55) 100%);
}
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.video-play svg {
  width: 54px;
  height: 54px;
  fill: rgba(255,255,255,0.9);
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.8));
  transition: transform 0.25s var(--ease);
}
.video-card:hover .video-play svg {
  transform: scale(1.14);
  fill: #fff;
}

.video-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.video-info h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.video-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.62;
  flex: 1;
  margin: 0;
}
.video-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.9rem;
  letter-spacing: 0.04em;
}

/* ---- Talks section dividers ---- */
.talks-section + .talks-section {
  border-top: 1px solid var(--border);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-content h1,
  .hero-tagline,
  .hero-cta,
  .scroll-indicator { opacity: 1; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  body { font-size: 17px; }
  .section { padding: 4rem 1.5rem; }
  .stats-row { gap: 2rem; }
  .card-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .read-card { flex-direction: column; }
  .read-card .read-cover { width: 60px; height: 90px; font-size: 1.5rem; }
  .hero-cta { flex-direction: column; align-items: center; }
}
