/* ==========================================================================
   "Signal" (Bold & Dynamic)
   Deep navy backgrounds, electric blue accents, geometric editorial design
   ========================================================================== */

/* ===== CSS Custom Properties ===== */
:root {
  /* Colors */
  --bg-primary: #0B1120;
  --bg-secondary: #111827;
  --surface: #1E293B;
  --surface-light: #FFFFFF;
  --text-on-dark: #F1F5F9;
  --text-secondary-dark: #94A3B8;
  --text-on-light: #0F172A;
  --text-secondary-light: #475569;
  --accent: #f97316;
  --accent-bright: #fb923c;
  --accent-glow: rgba(249, 115, 22, 0.3);
  --contrast: #F59E0B;
  --danger: #EF4444;
  --border-dark: rgba(255, 255, 255, 0.1);
  --border-light: #E2E8F0;

  /* Typography */
  --font-display: 'Space Mono', monospace;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Layout */
  --max-width: 1200px;
  --section-padding: 80px;
  --header-height: 72px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ===== Light Mode ===== */
[data-theme="light"] {
  --bg-primary: #FAFBFC;
  --bg-secondary: #F3F4F6;
  --surface: #FFFFFF;
  --surface-light: #FFFFFF;
  --text-on-dark: #111827;
  --text-secondary-dark: #6B7280;
  --text-on-light: #0F172A;
  --text-secondary-light: #475569;
  --accent: #ea580c;
  --accent-bright: #f97316;
  --accent-glow: rgba(234, 88, 12, 0.12);
  --contrast: #D97706;
  --danger: #DC2626;
  --border-dark: #E5E7EB;
  --border-light: #F3F4F6;
}

[data-theme="light"] .site-header {
  background-color: rgba(250, 251, 252, 0.92);
}

[data-theme="light"] .hero::before {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  opacity: 0.2;
}

[data-theme="light"] .hero-dot {
  box-shadow: 0 0 12px rgba(234, 88, 12, 0.2);
}

[data-theme="light"] .social-link {
  background: rgba(234, 88, 12, 0.06);
}

[data-theme="light"] .social-link:hover {
  background: rgba(234, 88, 12, 0.1);
}

[data-theme="light"] .modal {
  background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .modal-close {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .nav-overlay {
  background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .slide-prev,
[data-theme="light"] .slide-next {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-dark);
}

[data-theme="light"] .tech-tag {
  background: rgba(234, 88, 12, 0.08);
  border-color: rgba(234, 88, 12, 0.15);
}

[data-theme="light"] .page-header::before {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  opacity: 0.15;
}

[data-theme="light"] .error-page::before {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  opacity: 0.1;
}

[data-theme="light"] .featured-card:hover,
[data-theme="light"] .news-card:hover,
[data-theme="light"] .project-card:hover,
[data-theme="light"] .paper-card:hover,
[data-theme="light"] .blog-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .section-number {
  color: var(--accent);
  opacity: 0.06;
}

[data-theme="light"] .section-number.animate-on-scroll.animate-in {
  opacity: 0.06;
}

[data-theme="light"] .hero-section-number {
  color: var(--accent);
  opacity: 0.04;
}

[data-theme="light"] .surface {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .modal-content {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .link-btn:hover {
  background: rgba(234, 88, 12, 0.06);
}

[data-theme="light"] a {
  color: var(--accent);
}

[data-theme="light"] a:hover {
  color: var(--accent-bright);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-on-dark);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent);
}

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--surface-light);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-on-dark);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

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

.section {
  position: relative;
  padding: var(--section-padding) 0;
  overflow: hidden;
}

.section-dark {
  background-color: var(--bg-primary);
}

.section-darker {
  background-color: var(--bg-secondary);
}

/* Massive section numbers - editorial magazine style */
.section-number {
  font-family: var(--font-display);
  font-size: clamp(6rem, 15vw, 10rem);
  font-weight: 700;
  opacity: 0.04;
  position: absolute;
  top: 20px;
  left: -10px;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  color: var(--text-on-dark);
  z-index: 0;
}

.section-number.right {
  left: auto;
  right: -10px;
}

/* ===== Site Header / Navigation ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(11, 17, 32, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
  z-index: 1000;
  transition: background-color var(--transition-base);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-on-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-logo:hover {
  color: var(--accent-bright);
}

.logo-accent {
  color: var(--accent);
  font-size: 1.5em;
}

/* Desktop Nav */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-menu a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary-dark);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width var(--transition-base);
}

.nav-menu a:hover,
.nav-menu a.current {
  color: var(--text-on-dark);
}

.nav-menu a:hover::after,
.nav-menu a.current::after {
  width: 100%;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-dark);
  color: var(--text-secondary-dark);
  cursor: pointer;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

/* Dark mode: show sun, hide moon */
.theme-icon-dark {
  display: none;
}
.theme-icon-light {
  display: inline-block;
}

/* Light mode: show moon, hide sun */
[data-theme="light"] .theme-icon-dark {
  display: inline-block;
}
[data-theme="light"] .theme-icon-light {
  display: none;
}

/* Hamburger Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  gap: 5px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-on-dark);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

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

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

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

/* Nav Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.nav-overlay.open {
  display: block;
  opacity: 1;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-primary);
  padding-top: var(--header-height);
  overflow: hidden;
}

/* Grid pattern overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-dark) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  z-index: 0;
}

/* Diagonal clip-path at hero bottom */
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: var(--bg-secondary);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
  z-index: 1;
}

/* Decorative glowing blue dots */
.hero-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow);
  z-index: 0;
  opacity: 0.6;
}

.hero-dot:nth-child(1) {
  top: 20%;
  left: 10%;
}

.hero-dot:nth-child(2) {
  top: 60%;
  right: 15%;
}

.hero-dot:nth-child(3) {
  bottom: 25%;
  left: 30%;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 24px;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 8vw, 6rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-on-dark);
  margin-bottom: 16px;
  line-height: 1.05;
}

.hero-name .highlight {
  color: var(--accent);
}

.hero-tagline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  color: var(--text-secondary-dark);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.hero-section-number {
  font-family: var(--font-display);
  font-size: clamp(10rem, 25vw, 20rem);
  font-weight: 700;
  opacity: 0.03;
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  color: var(--text-on-dark);
  z-index: 0;
}

/* Social Links in Hero */
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border-dark);
  border-radius: 0;
  color: var(--text-secondary-dark);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-base);
  background: rgba(30, 41, 59, 0.4);
}

.social-link:hover {
  color: var(--text-on-dark);
  border-color: var(--accent);
  background: rgba(249, 115, 22, 0.1);
  transform: translateY(-2px);
}

.social-link i {
  font-size: 1rem;
  color: var(--accent-bright);
}

.social-link span {
  font-family: var(--font-body);
}

/* ===== About Section ===== */
.about-section {
  position: relative;
}

.about-banner {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-left: 3px solid var(--accent);
  margin-bottom: 40px;
}

.about-content h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-bright);
  margin-bottom: 12px;
  margin-top: 32px;
}

.about-content .about-bio {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-on-dark);
}

.about-content .about-section p {
  color: var(--text-secondary-dark);
  line-height: 1.8;
}

.last-edited {
  font-size: 0.8rem;
  color: var(--text-secondary-dark);
  margin-top: 40px;
  font-family: var(--font-display);
}

/* ===== Section Heading ===== */
.section-heading {
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.section-heading h2 {
  display: inline-block;
}

.section-heading h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin-top: 12px;
}

.section-heading p {
  color: var(--text-secondary-dark);
  margin-top: 8px;
  max-width: 600px;
}

/* ===== Page Header ===== */
.page-header {
  position: relative;
  padding: calc(var(--header-height) + 60px) 0 60px;
  background-color: var(--bg-primary);
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-dark) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.25;
  z-index: 0;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 50px;
  background-color: var(--bg-secondary);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
  z-index: 1;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-on-dark);
}

.page-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: var(--accent);
  margin-top: 16px;
}

.page-header .section-number {
  font-size: clamp(8rem, 20vw, 14rem);
  top: 50%;
  transform: translateY(-50%);
  right: -20px;
  left: auto;
  opacity: 0.03;
}

/* ===== Featured Section ===== */
.featured-section {
  position: relative;
}

.featured-section .section-heading h2::before {
  content: '//';
  color: var(--accent);
  margin-right: 8px;
}

/* Featured Grid */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  position: relative;
  z-index: 1;
}

.featured-card {
  position: relative;
  overflow: hidden;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  cursor: pointer;
  display: block;
  color: var(--text-on-dark);
  text-decoration: none;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.featured-card:hover {
  transform: translateX(-4px);
  box-shadow: 4px 0 20px var(--accent-glow);
  color: var(--text-on-dark);
}

.featured-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.featured-card:hover img {
  transform: scale(1.03);
}

.featured-overlay {
  padding: 20px;
}

.featured-date {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--text-secondary-dark);
  display: block;
  margin-top: 8px;
}

.featured-title {
  font-size: 1.15rem;
  margin-top: 8px;
  line-height: 1.4;
}

/* ===== Filter Buttons ===== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.filter-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 20px;
  border: 1px solid var(--border-dark);
  border-radius: 30px;
  color: var(--text-secondary-dark);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-base);
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface-light);
}

/* ===== Cards Grid ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  position: relative;
  z-index: 1;
}

/* ===== Base Card Styles ===== */
.news-card,
.project-card,
.paper-card,
.blog-card {
  background: var(--surface);
  border-left: 3px solid transparent;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-on-dark);
}

.news-card:hover,
.project-card:hover,
.paper-card:hover,
.blog-card:hover {
  transform: translateX(-4px);
  border-left-color: var(--accent);
  box-shadow: 4px 0 20px var(--accent-glow);
  color: var(--text-on-dark);
}

/* Card Image */
.card-image {
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.news-card:hover .card-image img,
.project-card:hover .card-image img,
.paper-card:hover .card-image img,
.blog-card:hover .card-image img {
  transform: scale(1.05);
}

/* Card Content */
.card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-date {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--text-secondary-dark);
  margin-bottom: 8px;
  display: block;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text-on-dark);
}

.card-description {
  font-size: 0.9rem;
  color: var(--text-secondary-dark);
  line-height: 1.6;
  flex: 1;
}

.card-context {
  font-size: 0.85rem;
  color: var(--accent-bright);
  margin-bottom: 8px;
  font-weight: 500;
}

.card-venue {
  font-size: 0.85rem;
  color: var(--accent-bright);
  font-weight: 500;
  margin-bottom: 4px;
}

.card-authors {
  font-size: 0.82rem;
  color: var(--text-secondary-dark);
  margin-bottom: 12px;
  line-height: 1.5;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  background: var(--accent);
  color: var(--surface-light);
}

.badge-award,
.badge-awards {
  background: var(--contrast);
  color: var(--bg-primary);
}

.badge-competition {
  background: #8B5CF6;
}

.badge-conference {
  background: #10B981;
}

.badge-internship {
  background: #EC4899;
}

.badge-leadership {
  background: #F97316;
}

.card-image .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

/* Award Badge */
.award-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--contrast);
  padding: 4px 0;
}

.award-badge i {
  color: var(--contrast);
}

/* Institution Badge */
.institution-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border: 1px solid var(--accent);
  color: var(--accent-bright);
  margin-right: 8px;
}

/* ===== Link Buttons ===== */
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-dark);
  color: var(--text-secondary-dark);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.link-btn:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: rgba(249, 115, 22, 0.1);
}

.link-btn i {
  font-size: 0.85rem;
}

.link-github:hover {
  border-color: #6e5494;
  color: #c9b1f7;
}

.link-demo:hover,
.link-preview:hover {
  border-color: #10B981;
  color: #34D399;
}

.link-video:hover {
  border-color: #EF4444;
  color: #F87171;
}

.link-paper:hover,
.link-pdf:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

/* ===== Tech Tags ===== */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tech-tag {
  font-family: var(--font-display);
  font-size: 0.7rem;
  padding: 3px 10px;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.2);
  color: var(--accent-bright);
}

/* ===== Modal ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 40px 24px;
  align-items: flex-start;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: var(--surface);
  width: 100%;
  max-width: 800px;
  margin: auto;
  position: relative;
  border-left: 3px solid var(--accent);
  animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-secondary-dark);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close:hover {
  color: var(--text-on-dark);
  border-color: var(--accent);
}

.modal-body {
  padding: 40px;
}

.modal-body h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-right: 48px;
}

.modal-body h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  margin-bottom: 12px;
  margin-top: 24px;
}

.modal-body p {
  color: var(--text-secondary-dark);
  line-height: 1.8;
}

.modal-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.modal-authors {
  color: var(--text-secondary-dark) !important;
  font-size: 0.9rem;
}

.modal-authors strong {
  color: var(--accent-bright);
}

.modal-venue {
  font-weight: 600;
  color: var(--text-on-dark) !important;
}

.context-text {
  color: var(--accent-bright);
  font-weight: 500;
  font-size: 0.9rem;
}

.year-text {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-secondary-dark);
}

.collaborators {
  font-size: 0.9rem;
  color: var(--text-secondary-dark);
  margin-top: 8px;
}

.modal-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

/* ===== BibTeX ===== */
.bibtex-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-dark);
}

.bibtex-toggle {
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 16px;
  border: 1px solid var(--border-dark);
  color: var(--text-secondary-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.bibtex-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.bibtex-content {
  margin-top: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-dark);
  font-family: var(--font-display);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-secondary-dark);
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
}

/* ===== Slideshow ===== */
.slideshow {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.slide {
  display: none;
}

.slide.active {
  display: block;
}

.slide img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  background: var(--bg-primary);
}

.slide-prev,
.slide-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(11, 17, 32, 0.8);
  border: 1px solid var(--border-dark);
  color: var(--text-on-dark);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 5;
}

.slide-prev {
  left: 12px;
}

.slide-next {
  right: 12px;
}

.slide-prev:hover,
.slide-next:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-dark);
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.dot.active {
  background: var(--accent);
}

/* ===== Empty State ===== */
.empty-message {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary-dark);
  font-size: 1rem;
  padding: 60px 20px;
  font-family: var(--font-display);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-dark);
  padding: 40px 0;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-text {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--text-secondary-dark);
}

.footer-text a {
  color: var(--accent-bright);
}

/* ===== 404 Page ===== */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.error-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-dark) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.2;
}

.error-content {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 40px 24px;
}

.error-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(8rem, 25vw, 16rem);
  line-height: 1;
  color: var(--danger);
  text-shadow: 0 0 60px rgba(239, 68, 68, 0.3);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.error-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-on-dark);
  margin-bottom: 16px;
}

.error-description {
  font-size: 1rem;
  color: var(--text-secondary-dark);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: all var(--transition-base);
}

.error-btn-primary {
  background: var(--accent);
  color: var(--surface-light);
  border: 1px solid var(--accent);
}

.error-btn-primary:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  color: var(--surface-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.error-btn-secondary {
  background: transparent;
  color: var(--text-secondary-dark);
  border: 1px solid var(--border-dark);
}

.error-btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  transform: translateY(-2px);
}

/* ===== Blog Post Page ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-bright);
  text-decoration: none;
  margin-bottom: 16px;
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: var(--accent);
}

.blog-post-content {
  max-width: 800px;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-on-dark);
  margin-bottom: 24px;
}

.post-body {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-secondary-dark);
}

.post-body h2,
.post-body h3,
.post-body h4 {
  color: var(--text-on-dark);
  margin-top: 32px;
  margin-bottom: 12px;
}

.post-body p {
  margin-bottom: 1.2rem;
}

.post-body img {
  border-left: 3px solid var(--accent);
  margin: 24px 0;
}

.post-body code {
  font-family: var(--font-display);
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--bg-primary);
  border: 1px solid var(--border-dark);
}

.post-body pre {
  background: var(--bg-primary);
  border: 1px solid var(--border-dark);
  padding: 16px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: var(--font-display);
  font-size: 0.85rem;
  line-height: 1.6;
}

.post-body pre code {
  padding: 0;
  background: none;
  border: none;
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 20px 0;
  color: var(--text-secondary-dark);
  font-style: italic;
}

.post-body ul,
.post-body ol {
  padding-left: 24px;
  margin-bottom: 1.2rem;
  list-style: disc;
}

.post-body ol {
  list-style: decimal;
}

.post-body li {
  margin-bottom: 0.5rem;
}

.post-tags {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-dark);
}

/* ===== Scroll Animations ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for grid children */
.animate-on-scroll.stagger-1 { transition-delay: 0.1s; }
.animate-on-scroll.stagger-2 { transition-delay: 0.2s; }
.animate-on-scroll.stagger-3 { transition-delay: 0.3s; }
.animate-on-scroll.stagger-4 { transition-delay: 0.4s; }
.animate-on-scroll.stagger-5 { transition-delay: 0.5s; }
.animate-on-scroll.stagger-6 { transition-delay: 0.6s; }

/* Section number slide in from left */
.section-number.animate-on-scroll {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-number.animate-on-scroll.animate-in {
  opacity: 0.04;
  transform: translateX(0);
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }

  .section-number.animate-on-scroll {
    opacity: 0.04;
    transform: none;
  }
}

/* ===== Responsive - Tablet ===== */
@media (max-width: 1024px) {
  :root {
    --section-padding: 60px;
  }

  .section-number {
    font-size: clamp(5rem, 12vw, 8rem);
  }

  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* ===== Responsive - Mobile ===== */
@media (max-width: 768px) {
  :root {
    --section-padding: 48px;
    --header-height: 64px;
  }

  /* Mobile Nav */
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 32px 40px;
    gap: 0;
    border-left: 1px solid var(--border-dark);
    transition: right var(--transition-base);
    z-index: 999;
    overflow-y: auto;
  }

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

  .nav-menu a {
    width: 100%;
    padding: 16px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-dark);
  }

  .nav-menu a::after {
    display: none;
  }

  .nav-menu a.current {
    color: var(--accent-bright);
    border-bottom-color: var(--accent);
  }

  /* Theme toggle in mobile */
  .theme-toggle {
    margin-left: auto;
    margin-right: 8px;
  }

  /* Hero */
  .hero-name {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .hero-tagline {
    font-size: 0.8rem;
  }

  .hero-section-number {
    font-size: 12rem;
    opacity: 0.02;
  }

  /* Cards */
  .cards-grid {
    grid-template-columns: 1fr;
  }

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

  /* Page Header */
  .page-header {
    padding: calc(var(--header-height) + 40px) 0 50px;
  }

  .page-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  /* Modal */
  .modal {
    padding: 20px 12px;
  }

  .modal-body {
    padding: 24px;
  }

  .modal-body h2 {
    font-size: 1.25rem;
  }

  /* Social links */
  .social-links {
    gap: 8px;
  }

  .social-link {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .social-link span {
    display: none;
  }

  /* Section numbers */
  .section-number {
    font-size: 5rem;
    opacity: 0.03;
  }

  /* About */
  .about-banner {
    height: 200px;
  }

  /* Filters */
  .filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2rem;
    letter-spacing: 0.04em;
  }

  .error-code {
    font-size: 7rem;
  }

  .error-actions {
    flex-direction: column;
    align-items: center;
  }

  .modal-body {
    padding: 20px;
  }
}

/* ==========================================================================
   Terminal UI + Orange theme additions
   ========================================================================== */

/* Animated orange aurora behind the hero */
.hero-aurora {
  position: absolute;
  inset: -25%;
  z-index: 0;
  background:
    radial-gradient(38% 38% at 20% 30%, rgba(249, 115, 22, 0.32), transparent 70%),
    radial-gradient(34% 34% at 82% 24%, rgba(251, 146, 60, 0.24), transparent 70%),
    radial-gradient(46% 46% at 62% 82%, rgba(245, 158, 11, 0.20), transparent 70%);
  filter: blur(46px);
  opacity: 0.85;
  animation: aurora-drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes aurora-drift {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1); }
  50%  { transform: translate3d(3%, 2%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 3%, 0) scale(1.04); }
}
[data-theme="light"] .hero-aurora { opacity: 0.5; }

/* Terminal window */
.terminal-window {
  position: relative;
  z-index: 2;
  width: min(720px, 92vw);
  margin: 0 auto;
  text-align: left;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(249, 115, 22, 0.18),
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 90px rgba(249, 115, 22, 0.14);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--bg-secondary) 78%, transparent);
  border-bottom: 1px solid var(--border-dark);
}
.terminal-btn { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.terminal-btn.red { background: #ff5f56; }
.terminal-btn.yellow { background: #ffbd2e; }
.terminal-btn.green { background: #27c93f; }
.terminal-title {
  margin-left: 10px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--text-secondary-dark);
  letter-spacing: 0.04em;
}
.terminal-body { padding: 28px 28px 32px; }
.terminal-line {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-secondary-dark);
  margin: 0 0 6px;
  letter-spacing: 0.02em;
  word-break: break-word;
}
.term-prompt { color: var(--accent); font-weight: 700; margin-right: 8px; }
.term-cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  margin-left: 2px;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: term-blink 1.05s steps(1) infinite;
}
@keyframes term-blink { 50% { opacity: 0; } }

/* Hero text tuned for terminal layout */
.terminal-body .hero-name { font-size: clamp(2.2rem, 6.5vw, 4.6rem); margin: 4px 0 18px; }
.terminal-body .hero-tagline {
  margin: 4px 0 18px;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--text-on-dark);
}
.terminal-body .social-links { justify-content: flex-start; margin-top: 10px; }

/* Terminal flavor on interior page titles */
.page-title::before { content: "~/ "; color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .hero-aurora { animation: none; }
  .term-cursor { animation: none; }
}

/* ==========================================================================
   BOLD TERMINAL REDESIGN  (animated bg + terminal cards + card nav + CRT)
   ========================================================================== */

/* Let the animated background show through */
html { background: #0a0e18; }
body { background: transparent; }
.hero { background: transparent !important; }
.page-header { background: transparent; }
.section-dark   { background: rgba(8, 12, 22, 0.74); }
.section-darker { background: rgba(6, 9, 17, 0.82); }
.site-footer    { background: rgba(6, 9, 17, 0.9); }

/* ----- Fixed animated gradient-blinds background ----- */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(720px circle at var(--mx, 50%) var(--my, 28%), rgba(249, 115, 22, 0.20), transparent 55%),
    linear-gradient(125deg, #0a0e18 0%, #0d1322 45%, #1a1108 100%);
  background-size: auto, 220% 220%;
  animation: bg-shift 18s ease-in-out infinite alternate;
}
.bg-fx::before {            /* vertical "blinds" slats */
  content: "";
  position: absolute;
  inset: -2px 0;
  background: repeating-linear-gradient(90deg,
      rgba(0, 0, 0, 0) 0 36px,
      rgba(0, 0, 0, 0.30) 36px 39px);
  animation: blinds-slide 22s linear infinite;
}
.bg-fx::after {             /* drifting orange glow blobs */
  content: "";
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(38% 38% at 18% 26%, rgba(249, 115, 22, 0.22), transparent 70%),
    radial-gradient(34% 34% at 84% 22%, rgba(251, 146, 60, 0.16), transparent 70%),
    radial-gradient(44% 44% at 62% 84%, rgba(245, 158, 11, 0.14), transparent 70%);
  filter: blur(50px);
  animation: aurora-drift 20s ease-in-out infinite alternate;
}
@keyframes bg-shift { to { background-position: 0 0, 100% 100%; } }
@keyframes blinds-slide { to { transform: translateX(39px); } }

/* CRT scanline overlay */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.12) 0 1px,
      transparent 1px 3px);
  mix-blend-mode: overlay;
  opacity: 0.25;
}

/* ----- Logo + nav as terminal / cards ----- */
.site-logo::before { content: "$ "; color: var(--accent); }

.nav-menu a {
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 8px 14px;
  background: rgba(17, 22, 34, 0.5);
  transition: all var(--transition-fast);
}
.nav-menu a::after { display: none !important; }
.nav-menu a:hover,
.nav-menu a.current {
  color: var(--text-on-dark);
  border-color: var(--accent);
  background: rgba(249, 115, 22, 0.12);
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.18);
}

/* ----- Section headings get a terminal prompt ----- */
.section-heading h2::before {
  content: "> ";
  color: var(--accent);
  font-family: var(--font-display);
}

/* ----- Cards as terminal windows ----- */
.news-card,
.project-card,
.paper-card,
.blog-card,
.featured-card {
  position: relative;
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 10px;
  background: rgba(15, 20, 32, 0.94);
  padding-top: 34px;
  overflow: hidden;
}
.news-card::before,
.project-card::before,
.paper-card::before,
.blog-card::before,
.featured-card::before {           /* terminal title bar */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 34px;
  background: rgba(9, 13, 23, 0.96);
  border-bottom: 1px solid var(--border-dark);
  z-index: 3;
}
.news-card::after,
.project-card::after,
.paper-card::after,
.blog-card::after,
.featured-card::after {            /* 3 traffic-light dots */
  content: "";
  position: absolute;
  top: 13px; left: 14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ff5f56;
  box-shadow: 15px 0 0 #ffbd2e, 30px 0 0 #27c93f;
  z-index: 4;
}
.news-card:hover,
.project-card:hover,
.paper-card:hover,
.blog-card:hover,
.featured-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 44px rgba(249, 115, 22, 0.18), 0 0 0 1px rgba(249, 115, 22, 0.4);
}
/* push the image-overlaid badge below the title bar */
.card-image .badge { top: 44px; }
/* card titles in terminal mono */
.card-title { font-family: var(--font-display); letter-spacing: 0.01em; }

/* ----- Typewriter reveal (only while JS types) ----- */
html.js-typing .reveal { opacity: 0; transform: translateY(8px); }
.reveal.typed { opacity: 1 !important; transform: none !important; transition: opacity 0.45s ease, transform 0.45s ease; }
.term-cmd { font-family: var(--font-display); color: var(--text-on-dark); }

@media (prefers-reduced-motion: reduce) {
  .bg-fx, .bg-fx::before, .bg-fx::after { animation: none; }
}

/* ==========================================================================
   Work page — merged terminal activity log / timeline
   ========================================================================== */
.terminal-subline {
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--text-on-dark);
  margin-top: 10px !important;
}
.terminal-subline .dim { color: var(--text-secondary-dark); }

.work-filters .filter-btn {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.timeline { position: relative; }

.log-entry {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 18px;
}

.log-rail { position: relative; display: flex; justify-content: center; }
.log-rail::before {
  content: "";
  position: absolute;
  top: 0; bottom: -24px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(var(--accent), rgba(249, 115, 22, 0.12));
}
.log-entry:last-child .log-rail::before { bottom: 50%; }
.log-dot {
  position: relative;
  z-index: 1;
  width: 13px; height: 13px;
  margin-top: 30px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
}

.log-card {
  position: relative;
  margin-bottom: 26px;
  background: rgba(15, 20, 32, 0.94);
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 10px;
  padding-top: 34px;
  overflow: hidden;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}
.log-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 34px;
  background: rgba(9, 13, 23, 0.96);
  border-bottom: 1px solid var(--border-dark);
}
.log-card::after {
  content: "";
  position: absolute; top: 13px; left: 14px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff5f56;
  box-shadow: 15px 0 0 #ffbd2e, 30px 0 0 #27c93f;
}
.log-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 44px rgba(249, 115, 22, 0.16), 0 0 0 1px rgba(249, 115, 22, 0.35);
}

.log-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px 0;
}
.log-tag {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: lowercase;
  color: var(--accent);
}
.tag-award, .tag-awards { color: var(--contrast); }
.tag-hackathon, .tag-competition { color: #c084fc; }
.tag-internship { color: #f472b6; }
.tag-leadership, .tag-work { color: #fb923c; }
.tag-conference { color: #34d399; }
.log-date {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--text-secondary-dark);
}
.log-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.3;
  padding: 6px 20px 0;
}
.log-context {
  padding: 4px 20px 0;
  color: var(--accent-bright);
  font-size: 0.82rem;
  font-family: var(--font-display);
}
.log-desc {
  padding: 10px 20px;
  color: var(--text-secondary-dark);
  font-size: 0.92rem;
  line-height: 1.65;
}
.log-card .tech-tags { padding: 0 20px 6px; }
.log-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 20px 18px;
}
.log-card .award-badge { margin-left: auto; }
