/* ==========================================
   VARIABLES & BASE
   ========================================== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f18;
    --bg-card: #12121e;
    --bg-card-hover: #181830;
    --text-primary: #e8e8f0;
    --text-secondary: #8888aa;
    --text-muted: #555577;
    --accent: #00ff88;
    --accent-dim: rgba(0, 255, 136, 0.15);
    --accent-glow: rgba(0, 255, 136, 0.3);
    --accent-blue: #4488ff;
    --accent-purple: #8844ff;
    --gold: #ffcc44;
    --border: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(0, 255, 136, 0.2);
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-primary);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

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

/* ==========================================
   CIRCUIT CANVAS BACKGROUND
   ========================================== */
#circuitCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

/* ==========================================
   NAVIGATION
   ========================================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

#navbar.scrolled {
    padding: 0.6rem 3rem;
    background: rgba(10, 10, 15, 0.95);
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}

.logo-bracket {
    color: var(--text-muted);
}

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

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
    padding: 0.3rem 0;
    transition: var(--transition);
    letter-spacing: 0.05em;
}

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

.nav-link:hover, .nav-link.active {
    color: var(--accent);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.nav-hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 999;
    flex-direction: column;
    padding: 6rem 2rem;
    gap: 1.5rem;
    transition: right 0.4s ease;
    border-left: 1px solid var(--border-accent);
}

.mobile-menu.active {
    right: 0;
}

.mobile-link {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.mobile-link:hover {
    color: var(--accent);
    padding-left: 0.5rem;
}

/* ==========================================
   SECTIONS BASE
   ========================================== */
.section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 6rem 0;
}

.section-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent);
    opacity: 0.6;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-accent), transparent);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding-top: 5rem;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-greeting {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-prompt {
    opacity: 0.5;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--accent);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-name {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.name-line {
    display: block;
}

.name-line.accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.highlight {
    color: var(--accent);
    font-weight: 600;
}

/* Hero Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-item {
    text-align: center;
    position: relative;
}

.stat-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Hero Buttons */
.hero-cta {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
}

.btn-primary:hover {
    background: #33ffaa;
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: var(--accent-dim);
    transform: translateY(-2px);
}

.btn-icon {
    transition: transform 0.3s ease;
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Oscilloscope Visual */
.hero-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
}

#oscilloscope {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.oscilloscope-frame {
    position: absolute;
    inset: 0;
    border: 2px solid var(--border-accent);
    border-radius: 12px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
}

.osc-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    opacity: 0.6;
    letter-spacing: 0.2em;
}

.osc-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.osc-knob {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0.4;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: float 3s ease-in-out infinite;
}

.scroll-indicator span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.mouse {
    width: 20px;
    height: 32px;
    border: 2px solid var(--text-muted);
    border-radius: 10px;
    position: relative;
}

.wheel {
    width: 3px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(10px); opacity: 0; }
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* ==========================================
   SKILLS MARQUEE
   ========================================== */
.skills-marquee {
    position: relative;
    z-index: 1;
    overflow: hidden;
    padding: 1.5rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.marquee-track {
    display: flex;
    width: fit-content;
}

.marquee-content {
    display: flex;
    gap: 2rem;
    animation: marquee 30s linear infinite;
    padding-right: 2rem;
}

.skill-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
}

.chip-icon {
    font-size: 0.7rem;
    color: var(--accent);
    font-style: normal;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================
   TIMELINE (Experience)
   ========================================== */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-blue), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
}

.marker-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--accent);
    position: relative;
    z-index: 2;
}

.marker-pulse {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 0; }
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--border-accent);
    box-shadow: 0 8px 40px rgba(0, 255, 136, 0.05);
}

.timeline-header {
    margin-bottom: 1.5rem;
}

.date-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.location {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.timeline-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.achievement-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 2px solid var(--accent-dim);
    transition: var(--transition);
}

.achievement-card:hover {
    background: rgba(0, 255, 136, 0.03);
    border-left-color: var(--accent);
}

.achievement-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--accent);
    opacity: 0.7;
    margin-top: 2px;
}

.achievement-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.metric {
    color: var(--accent);
    font-weight: 700;
    font-family: var(--font-mono);
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
}

/* ==========================================
   PROJECTS
   ========================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.project-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card.featured {
    grid-column: span 2;
}

.project-card-inner {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.project-card-inner:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 255, 136, 0.08);
}

.project-circuit-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    pointer-events: none;
}

.project-canvas {
    width: 100%;
    height: 100%;
}

.project-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
}

.project-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.project-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.project-tech span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 3px;
}

.project-media-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.media-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: transparent;
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 16px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.media-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(100, 255, 218, 0.15);
}

.media-btn:hover::before {
    opacity: 0.06;
}

.media-btn.active {
    background: var(--accent-dim);
    border-color: var(--accent);
}

.media-btn svg,
.media-btn span {
    position: relative;
    z-index: 1;
}

.project-media-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin 0.3s ease;
    opacity: 0;
    margin-bottom: 0;
    border-radius: 8px;
}

.project-media-panel.open {
    max-height: 450px;
    opacity: 1;
    margin-bottom: 0.8rem;
}

.project-media-panel > img {
    max-width: 100%;
    max-height: 250px;
    width: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    object-fit: contain;
}

.project-media-panel > img:hover {
    border-color: rgba(100, 255, 218, 0.3);
    box-shadow: 0 4px 20px rgba(100, 255, 218, 0.08);
}

.project-media-panel iframe {
    width: 100%;
    height: 300px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #000;
}

/* YouTube Preview Card */
.yt-preview {
    display: block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.yt-preview:hover {
    border-color: rgba(255, 0, 0, 0.4);
    box-shadow: 0 4px 24px rgba(255, 0, 0, 0.1);
}

.yt-preview img {
    width: 100%;
    display: block;
    border: none !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: cover;
}

.yt-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.3s ease;
}

.yt-preview:hover .yt-play-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.yt-play-btn {
    transition: transform 0.3s ease;
}

.yt-preview:hover .yt-play-btn {
    transform: scale(1.1);
}

.yt-watch-text {
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-top: 0.6rem;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.project-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Research */
.subsection-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.subsection-title svg {
    color: var(--accent);
}

.research-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.research-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.research-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.research-item:hover {
    border-color: var(--border-accent);
}

.research-year {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    white-space: nowrap;
    min-width: 5rem;
}

.research-info h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.research-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.research-meta {
    margin-top: 0.5rem;
}

.research-venue {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--gold);
    padding: 0.25rem 0.7rem;
    background: rgba(255, 204, 68, 0.06);
    border: 1px solid rgba(255, 204, 68, 0.15);
    border-radius: 14px;
    letter-spacing: 0.3px;
}

.research-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.research-fig-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: transparent;
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 16px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
}

.research-fig-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(100, 255, 218, 0.1);
    background: rgba(100, 255, 218, 0.04);
}

.research-fig-btn.active {
    background: var(--accent-dim);
    border-color: var(--accent);
}

.research-fig-btn.active .fig-chevron {
    transform: rotate(180deg);
}

.fig-chevron {
    transition: transform 0.3s ease;
}

.research-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: transparent;
    border: 1px solid rgba(255, 204, 68, 0.2);
    border-radius: 16px;
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-decoration: none;
    transition: var(--transition);
}

.research-link-btn:hover {
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(255, 204, 68, 0.1);
    background: rgba(255, 204, 68, 0.04);
}

.research-fig-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
    text-align: center;
}

.research-fig-panel.open {
    max-height: 350px;
    opacity: 1;
    margin-top: 0.8rem;
}

.research-fig-panel img {
    max-width: 100%;
    max-height: 240px;
    width: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    object-fit: contain;
}

.research-fig-panel img:hover {
    border-color: rgba(100, 255, 218, 0.3);
    box-shadow: 0 4px 20px rgba(100, 255, 218, 0.08);
}

.fig-caption {
    display: block;
    margin-top: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ==========================================
   EDUCATION
   ========================================== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.edu-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.edu-card:hover {
    border-color: var(--border-accent);
    box-shadow: 0 8px 40px rgba(0, 255, 136, 0.05);
}

.edu-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.edu-icon svg {
    width: 40px;
    height: 40px;
}

.edu-period {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.edu-degree {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.edu-field {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.edu-institution {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.edu-university {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.edu-score {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.score-ring {
    position: relative;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.score-ring svg {
    width: 100%;
    height: 100%;
}

.score-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
}

.score-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.coursework-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.coursework-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.coursework-tags span {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-muted);
}

/* Test Scores */
.test-score-grid {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.test-score-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.test-name {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.3rem;
}

.test-total {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    font-family: var(--font-mono);
}

.test-total span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.test-breakdown {
    margin-top: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.test-sub {
    display: grid;
    grid-template-columns: 50px 40px 1fr;
    align-items: center;
    gap: 0.5rem;
}

.sub-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sub-score {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

.sub-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.sub-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-blue));
    border-radius: 2px;
    transition: width 1s ease;
}

/* ==========================================
   AWARDS
   ========================================== */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.award-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.award-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.award-card:hover {
    border-color: rgba(255, 204, 68, 0.3);
    box-shadow: 0 8px 40px rgba(255, 204, 68, 0.05);
    transform: translateY(-4px);
}

.award-icon-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 1.2rem;
}

.award-glow {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 204, 68, 0.1), transparent);
}

.award-icon {
    position: relative;
    width: 100%;
    height: 100%;
}

.award-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--gold);
}

.award-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Certificate Dropdown */
.cert-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.45rem 1rem;
    background: transparent;
    border: 1px solid rgba(255, 204, 68, 0.25);
    border-radius: 20px;
    color: var(--gold);
    font-size: 0.75rem;
    font-family: inherit;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
}

.cert-toggle:hover {
    background: rgba(255, 204, 68, 0.08);
    border-color: rgba(255, 204, 68, 0.5);
}

.cert-toggle.active {
    background: rgba(255, 204, 68, 0.1);
    border-color: var(--gold);
}

.cert-toggle.active svg {
    transform: rotate(180deg);
}

.cert-toggle svg {
    transition: transform 0.3s ease;
}

.cert-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
    opacity: 0;
    margin-top: 0;
}

.cert-dropdown.open {
    max-height: 400px;
    opacity: 1;
    margin-top: 1rem;
}

.cert-dropdown img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.cert-dropdown img:hover {
    border-color: rgba(255, 204, 68, 0.4);
    box-shadow: 0 4px 20px rgba(255, 204, 68, 0.1);
    transform: scale(1.02);
}

/* Certificate Lightbox */
.cert-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 2rem;
}

.cert-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.cert-lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cert-lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

/* ==========================================
   CONTACT
   ========================================== */
#contact {
    min-height: auto;
    padding-bottom: 2rem;
}

.contact-content {
    text-align: center;
}

.contact-text {
    max-width: 500px;
    margin: 0 auto 3rem;
}

.contact-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--border-accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.contact-card svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.contact-card span {
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    position: relative;
    z-index: 1;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    overflow: hidden;
}

.footer-circuit {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.1;
}

#footerCircuit {
    width: 100%;
    height: 100%;
}

.footer-content {
    position: relative;
    z-index: 1;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.footer-equation {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.5;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-visual {
        max-width: 500px;
        margin: 0 auto;
    }

    .hero-name {
        font-size: 3.5rem;
    }

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

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .mobile-menu { display: flex; }

    #navbar {
        padding: 1rem 1.5rem;
    }

    .hero-content {
        padding: 0 1.5rem;
    }

    .hero-name {
        font-size: 2.8rem;
    }

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

    .hero-cta {
        flex-direction: column;
    }

    .hero-visual {
        max-width: 100%;
    }

    .section-container {
        padding: 0 1.5rem;
    }

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

    .project-card.featured {
        grid-column: span 1;
    }

    .project-media-panel iframe {
        height: 220px;
    }

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

    .contact-links {
        grid-template-columns: 1fr;
    }

    .research-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .timeline {
        padding-left: 2rem;
    }

    .timeline-marker {
        left: -2rem;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

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

@media (max-width: 480px) {
    .hero-name {
        font-size: 2.2rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}
