﻿/* ========== CSS Variables ========== */
/* Default theme: Professional Navy / Teal */
:root {
    --primary-color: #1565a0;
    --secondary-color: #0e3a5f;
    --accent-color: #2dd4bf;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%);

    --text-color: #0f2540;
    --text-light: #5a6b7b;
    --text-muted: #5a6b7b;

    --bg-color: #f4f7fb;
    --bg-light: #eaf0f7;
    --bg-dark: #0a1424;
    --surface: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --border-color: #d8e1ea;

    --hero-bg: linear-gradient(135deg, #0e3a5f 0%, #14507a 60%, #0e3a5f 100%);
    --hero-text: #ffffff;

    --tint-1: rgba(21, 101, 160, 0.08);
    --tint-2: rgba(45, 212, 191, 0.12);

    --shadow: 0 4px 6px rgba(15, 37, 64, 0.08);
    --shadow-lg: 0 10px 30px rgba(15, 37, 64, 0.15);
    --transition: all 0.3s ease;

    --status-color: #0d9488;
    --status-bg: rgba(45, 212, 191, 0.12);
    --status-border: rgba(45, 212, 191, 0.40);

    /* Tech accents */
    --neon: #14b8a6;
    --neon-bright: #22d3ee;
    --glow-sm: 0 0 12px rgba(20, 184, 166, 0.35);
    --glow-md: 0 0 28px rgba(20, 184, 166, 0.28);

    /* Fonts */
    --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --font-body: 'Inter', 'Segoe UI', Tahoma, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: radial-gradient(rgba(15, 37, 64, 0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .section-title, .hero-title {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Keyboard users get a way past the nav. Visible only while focused. */
.skip-link {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -120%);
    z-index: 1100;
    padding: 0.7rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--surface);
    background: var(--secondary-color);
    border: 1px solid var(--neon);
    border-radius: 0 0 6px 6px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translate(-50%, 0);
    outline: 2px solid var(--neon);
    outline-offset: 2px;
}

/* Consistent, visible focus ring for keyboard navigation. */
:focus-visible {
    outline: 2px solid var(--neon);
    outline-offset: 3px;
    border-radius: 4px;
}

section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    color: var(--text-color);
}

.section-title::before {
    content: '// ';
    font-family: var(--font-mono);
    font-size: 1.4rem;
    color: var(--neon);
    -webkit-text-fill-color: var(--neon);
    vertical-align: middle;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--neon);
    border-radius: 2px;
    box-shadow: var(--glow-sm);
}

/* ========== Navigation ========== */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

#navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

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

.logo a {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.logo a::before {
    content: '> ';
    color: var(--neon);
}

.logo a::after {
    content: '_';
    color: var(--neon);
    animation: blink 1s steps(1) infinite;
}

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

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--neon);
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    /* Reset UA button styling - this is a <button> for keyboard/AT support. */
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font: inherit;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* ========== Hero Section ========== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--hero-bg);
    color: var(--hero-text);
    text-align: center;
    padding: 100px 20px 50px;
    position: relative;
    overflow: hidden;
}

/* Neon grid overlay on hero */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
    pointer-events: none;
}

/* Cursor-tracked grid cell highlight */
.grid-cell {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: rgba(34, 211, 238, 0.18);
    border: 1px solid rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.4);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease;
    position: relative;
    z-index: 1;
}

.hero-kicker {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--neon-bright);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.hero-subtitle .prompt {
    font-family: var(--font-mono);
    color: var(--neon-bright);
    font-weight: 700;
}

.blink {
    animation: blink 1s steps(1) infinite;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.highlight {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    min-height: 2rem;
}

#typewriter {
    font-family: var(--font-mono);
    font-weight: 400;
}

.cursor {
    color: var(--neon-bright);
    font-family: var(--font-mono);
    animation: blink 0.7s infinite;
}

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    font-family: var(--font-mono);
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: var(--neon);
    color: #04201c;
    border: 2px solid var(--neon);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--neon-bright);
    border: 2px solid rgba(34, 211, 238, 0.5);
}

.btn-secondary:hover {
    border-color: var(--neon-bright);
    box-shadow: var(--glow-sm);
    transform: translateY(-3px);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--neon-bright);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.arrow {
    font-size: 1.5rem;
}

/* ========== News / Paper Highlight Section ========== */
.news {
    background: transparent;
    padding-top: 64px;
    padding-bottom: 64px;
}

.news-kicker {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--neon);
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.news-kicker .accepted-flag {
    color: var(--neon-bright);
    font-weight: 700;
}

/* registered angle so the conic gradient can actually animate */
@property --news-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

.news-card {
    position: relative;
    overflow: hidden;
    max-width: 860px;
    margin: 0 auto;
    background: var(--hero-bg);
    border: 1px solid rgba(45, 212, 191, 0.30);
    border-radius: 16px;
    padding: 2.75rem 2.5rem;
    box-shadow: var(--glow-md), var(--shadow-lg);
    color: #eaf6ff;
    animation: news-glow 4s ease-in-out infinite;
    /* The EUSIPCO publication citation links directly to this card. */
    scroll-margin-top: 100px;
}

@keyframes news-glow {
    0%, 100% { box-shadow: 0 0 28px rgba(20, 184, 166, 0.22), var(--shadow-lg); }
    50%      { box-shadow: 0 0 42px rgba(34, 211, 238, 0.38), var(--shadow-lg); }
}

/* rotating light beam traveling around the border */
.news-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(
        from var(--news-angle),
        transparent 0deg,
        transparent 65deg,
        var(--neon-bright) 105deg,
        #a855f7 125deg,
        var(--neon-bright) 145deg,
        transparent 185deg,
        transparent 245deg,
        rgba(34, 211, 238, 0.6) 290deg,
        transparent 330deg,
        transparent 360deg
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
    animation: news-border-spin 4.5s linear infinite;
}

@keyframes news-border-spin {
    to { --news-angle: 360deg; }
}

/* speed the beam up on hover */
.news-card:hover::after {
    animation-duration: 1.6s;
}

/* subtle grid texture inside the card */
.news-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(45, 212, 191, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 212, 191, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: radial-gradient(ellipse at top right, black, transparent 75%);
    mask-image: radial-gradient(ellipse at top right, black, transparent 75%);
    pointer-events: none;
}

.news-card > * {
    position: relative;
    z-index: 1;
}

.news-spark {
    position: absolute;
    z-index: 1;
    color: var(--neon-bright);
    pointer-events: none;
    animation: spark-twinkle 2.4s ease-in-out infinite;
}

.news-spark-1 { top: 18px;  right: 28px;  font-size: 1.4rem; animation-delay: 0s; }
.news-spark-2 { top: 60px;  right: 70px;  font-size: 0.9rem; animation-delay: 0.8s; }
.news-spark-3 { bottom: 26px; right: 40px; font-size: 1.1rem; animation-delay: 1.5s; }

@keyframes spark-twinkle {
    0%, 100% { opacity: 0.25; transform: scale(0.85) rotate(0deg); }
    50%      { opacity: 1;    transform: scale(1.15) rotate(45deg); }
}

.news-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.news-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--neon-bright);
    background: rgba(45, 212, 191, 0.10);
    border: 1px solid rgba(45, 212, 191, 0.45);
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
}

.news-logo {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.35), var(--glow-sm);
    flex-shrink: 0;
}

.news-logo img {
    height: 34px;
    width: auto;
    display: block;
}

.news-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-bright);
    box-shadow: 0 0 8px var(--neon-bright);
    animation: badge-pulse 1.4s ease-in-out infinite;
}

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

.news-title {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.news-subtitle {
    font-size: 1.1rem;
    color: var(--neon-bright);
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.news-authors {
    font-size: 0.95rem;
    color: #c4d6e6;
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

.news-authors .me {
    color: var(--neon-bright);
    font-weight: 700;
    background: rgba(45, 212, 191, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
}

.news-affil {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #8fb0c9;
    margin-bottom: 1.5rem;
}

.news-affil span {
    position: relative;
}

.news-affil span:not(:last-child)::after {
    content: '\00B7';
    position: absolute;
    right: -0.7rem;
    color: var(--neon);
}

.news-abstract {
    font-size: 1rem;
    line-height: 1.7;
    color: #d4e4f1;
    margin-bottom: 1.6rem;
}

.news-abstract strong {
    color: var(--neon-bright);
    font-weight: 600;
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.8rem;
}

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

.btn-soon {
    background: rgba(45, 212, 191, 0.06);
    color: #8fb0c9;
    border: 2px dashed rgba(45, 212, 191, 0.40);
    cursor: default;
    user-select: none;
}

/* ========== Achievements & Highlights Section ========== */
.achievements {
    background: transparent;
}

.ach-cmd {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--neon);
    opacity: 0.65;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

.ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.ach-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid rgba(20, 184, 166, 0.18);
    border-left: 3px solid var(--neon);
    border-radius: 0 10px 10px 0;
    padding: 1.1rem 1.3rem;
    transition: var(--transition);
}

.ach-card:hover {
    border-left-color: var(--neon-bright);
    box-shadow: var(--glow-sm);
    transform: translateY(-3px);
}

.ach-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--neon);
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.30);
    border-radius: 10px;
}

.ach-icon svg {
    width: 22px;
    height: 22px;
}

.ach-body h3 {
    font-size: 1.02rem;
    color: var(--text-color);
    margin-bottom: 0.15rem;
    line-height: 1.25;
}

.ach-body p {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* ---- Scrolling logo wall ---- */
.ach-wall-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon);
    opacity: 0.7;
    text-align: center;
    margin-bottom: 1.25rem;
}

.logo-marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.logo-track {
    display: flex;
    align-items: stretch;
    gap: 1.1rem;
    width: max-content;
    animation: logo-scroll 40s linear infinite;
}

.logo-marquee:hover .logo-track {
    animation-play-state: paused;
}

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

.logo-tile {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    height: 72px;
    padding: 0 1.4rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.logo-tile:hover {
    border-color: var(--neon);
    box-shadow: var(--glow-sm);
}

.logo-tile .logo-img {
    max-height: 40px;
    max-width: 150px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* wordmark fallback shown only when the logo image is missing */
.logo-tile .logo-name {
    display: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--secondary-color);
    white-space: nowrap;
}

.logo-tile.no-logo .logo-name {
    display: inline;
}

/* ========== About Section ========== */
.about {
    background: transparent;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.about-image img {
    display: block;
    width: 100%;
    max-width: 420.8px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    object-fit: cover;
    object-position: center;
}

.about-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.about-info {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--neon);
    border-radius: 10px;
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    box-shadow: var(--shadow);
}

.about-info::before {
    content: '// profile.json';
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.info-item {
    display: flex;
    gap: 1rem;
}

.info-item strong {
    color: var(--neon);
    font-weight: 500;
    min-width: 120px;
}

.info-item strong::before {
    content: '"';
}

.info-item strong::after {
    content: '":';
}

.info-item span {
    color: var(--text-color);
}

.info-item span::before,
.info-item span::after {
    content: '"';
    color: var(--text-light);
}

.info-item span a {
    color: inherit;
    text-decoration: none;
}

.info-item span a:hover {
    color: var(--neon);
    text-decoration: underline;
}

/* ========== Skills Section (gen-Z redesign) ========== */
.skills {
    background: transparent;
}

.skills-cmd {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--neon);
    opacity: 0.65;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

/* Category rows */
.skill-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.skill-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border: 1px solid rgba(20, 184, 166, 0.18);
    border-left: 3px solid var(--neon);
    border-radius: 0 8px 8px 0;
    transition: var(--transition);
}

.skill-row:hover {
    border-left-color: var(--neon-bright);
    box-shadow: var(--glow-sm);
}

.skill-row-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--neon);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
    padding-top: 0.25rem;
    min-width: 115px;
    opacity: 0.9;
}

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

/* ---- Infinite scrolling ticker ---- */
.skills-ticker {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
    /* edge fade masks */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.ticker-row {
    overflow: hidden;
    width: 100%;
}

.ticker-inner {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: ticker-scroll-left 28s linear infinite;
}

.ticker-inner-right {
    animation: ticker-scroll-right 34s linear infinite;
}

.ticker-row:hover .ticker-inner,
.ticker-row:hover .ticker-inner-right {
    animation-play-state: paused;
}

.ticker-tag {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.38rem 0.9rem;
    border: 1px solid rgba(20, 184, 166, 0.45);
    border-radius: 4px;
    color: var(--neon);
    background: rgba(20, 184, 166, 0.05);
    white-space: nowrap;
    cursor: default;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.ticker-tag:hover {
    background: rgba(20, 184, 166, 0.18);
    box-shadow: var(--glow-sm);
}

@keyframes ticker-scroll-left {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes ticker-scroll-right {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Shared tag chip.
   Single canonical definition: this used to be declared twice (once here, once
   ~300 lines earlier). This block won the cascade, so these are the values that
   were actually rendering. The hover `background` below is the one declaration
   inherited from the removed duplicate. */
.tag {
    font-family: var(--font-mono);
    background: var(--tint-2);
    color: #0d7a70;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(20, 184, 166, 0.35);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.tag::before {
    content: '#';
    color: var(--neon);
    opacity: 0.7;
}

.tag:hover {
    background: rgba(20, 184, 166, 0.15);
    border-color: var(--neon);
    box-shadow: var(--glow-sm);
    transform: translateY(-2px);
}

.show-more-btn {
    font-family: var(--font-mono);
    background: transparent;
    color: var(--neon);
    border: 1px solid rgba(20, 184, 166, 0.4);
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition);
    margin-top: 1rem;
    display: inline-block;
}

.show-more-btn:hover {
    border-color: var(--neon);
    box-shadow: var(--glow-sm);
    transform: translateY(-2px);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* ========== Contact Section ========== */
.contact {
    background: transparent;
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--tint-1) 0%, transparent 70%);
    border-radius: 50%;
}

.contact::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--tint-2) 0%, transparent 70%);
    border-radius: 50%;
}

.contact .container {
    position: relative;
    z-index: 1;
}

/* Contact Header */
.contact-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.contact-subtitle {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--tint-2);
    border: 1px solid rgba(20, 184, 166, 0.35);
    border-radius: 8px;
    color: var(--neon);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.contact-header .section-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-description {
    font-size: 1.15rem;
    color: var(--text-light);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* Contact Content */
.contact-content {
    max-width: 1100px;
    margin: 0 auto;
}

/* Contact Cards */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: var(--surface);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--tint-1);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.contact-card:hover .card-glow {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--tint-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-card:hover .icon-wrapper {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: scale(1.1) rotate(-5deg);
}

.card-header h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 700;
    margin: 0;
}

.card-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.contact-link svg {
    transition: transform 0.3s ease;
}

.contact-link:hover {
    color: var(--secondary-color);
    gap: 0.75rem;
}

.contact-link:hover svg {
    transform: translate(2px, -2px);
}

.location-text {
    color: var(--text-color);
    font-size: 1.05rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Social Connect */
.social-connect {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

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

.social-icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--tint-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.social-header h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.social-header p {
    color: var(--text-light);
    margin: 0;
    font-size: 1rem;
}

.social-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-btn {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    padding: 1.125rem 2rem;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid;
}

.linkedin-btn {
    background: linear-gradient(135deg, rgba(10, 102, 194, 0.08), rgba(10, 102, 194, 0.08));
    border-color: rgba(10, 102, 194, 0.2);
    color: #0a66c2;
}

.github-btn {
    background: linear-gradient(135deg, rgba(36, 41, 47, 0.08), rgba(36, 41, 47, 0.08));
    border-color: rgba(36, 41, 47, 0.2);
    color: #24292f;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.social-btn:hover .btn-shine {
    left: 100%;
}

.linkedin-btn:hover {
    background: linear-gradient(135deg, #0a66c2, #004182);
    border-color: #0a66c2;
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(10, 102, 194, 0.25);
}

.github-btn:hover {
    background: linear-gradient(135deg, #24292f, #000000);
    border-color: #24292f;
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(36, 41, 47, 0.25);
}

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

.social-btn:hover svg {
    transform: scale(1.15);
}

/* Contact Footer */
.contact-footer {
    text-align: center;
    margin-top: 4rem;
}

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--status-bg);
    border: 2px solid var(--status-border);
    border-radius: 8px;
    color: var(--status-color);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.95rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    position: relative;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact {
        padding: 4rem 0;
    }
    
    .contact-header .section-title {
        font-size: 2.25rem;
    }
    
    .contact-description {
        font-size: 1.05rem;
    }
    
    .contact-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .social-header {
        flex-direction: column;
        text-align: center;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .social-btn {
        min-width: 100%;
    }
    
    .availability-badge {
        font-size: 0.9rem;
        padding: 0.875rem 1.5rem;
    }
}

/* ========== Volunteering & Leadership Section ========== */
.volunteering {
    background: transparent;
}

.timeline {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    padding-left: 30px;
}

/* Timeline line */
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--neon), var(--primary-color));
    box-shadow: var(--glow-sm);
}

.timeline-item {
    background: var(--surface);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    transition: var(--transition);
    position: relative;
    margin-left: 40px;
    /* The assistant widget links citations straight to one card's id; without
       this the fixed navbar covers the top of it when the browser jumps there. */
    scroll-margin-top: 100px;
}

/* Timeline dot */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -56px;
    top: 30px;
    width: 14px;
    height: 14px;
    background: var(--surface);
    border: 3px solid var(--neon);
    border-radius: 50%;
    box-shadow: var(--glow-sm);
    z-index: 1;
}

.timeline-item:hover {
    transform: translateX(10px);
    border-color: var(--neon);
    box-shadow: var(--glow-md);
}

.timeline-item:hover::before {
    background: var(--primary-color);
    border-color: var(--secondary-color);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-header h3 {
    font-size: 1.3rem;
    color: var(--text-color);
    flex: 1;
    min-width: 200px;
}

.timeline-date {
    font-family: var(--font-mono);
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    background: var(--tint-2);
    border: 1px solid rgba(20, 184, 166, 0.3);
    padding: 4px 12px;
    border-radius: 6px;
}

.timeline-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 1rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-details {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
}

.timeline-details p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.timeline-details ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.timeline-details li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.timeline-details a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.timeline-details a:hover {
    text-decoration: underline;
}

/* ========== Certifications Section ========== */
.certifications {
    background: transparent;
}

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

.cert-card {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    padding: 1.6rem 1.6rem 1.4rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: left;
    transition: var(--transition);
}

/* faint mono corner bracket */
.cert-card::before {
    content: '</>';
    position: absolute;
    top: 0.9rem;
    right: 1.1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon);
    opacity: 0;
    transition: var(--transition);
}

.cert-card:hover {
    transform: translateY(-8px);
    border-color: var(--neon);
    box-shadow: var(--glow-md);
}

.cert-card:hover::before {
    opacity: 0.35;
}

.cert-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.cert-index {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--neon);
    opacity: 0.45;
    line-height: 1;
}

.cert-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--neon);
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.40);
    padding: 0.25rem 0.55rem;
    border-radius: 5px;
}

.cert-verified svg {
    color: var(--neon-bright);
}

.cert-card h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 0.4rem;
}

.cert-issuer {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 1.3rem;
}

.cert-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cert-year {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--neon);
    background: rgba(20, 184, 166, 0.06);
    border: 1px solid rgba(20, 184, 166, 0.35);
    padding: 3px 10px;
    border-radius: 4px;
}

.cert-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-family: var(--font-mono);
    background: var(--surface);
    color: var(--neon);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    border: 1px solid rgba(20, 184, 166, 0.45);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cert-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--neon);
    transition: left 0.5s;
    z-index: -1;
}

.cert-link:hover::before {
    left: 0;
}

.cert-link:hover {
    color: #04201c;
    border-color: var(--neon);
    transform: translateY(-2px);
    box-shadow: var(--glow-sm);
}

.cert-link:active {
    transform: translateY(0);
}

/* ========== Footer ========== */
.footer {
    background: var(--bg-dark);
    color: #cbd5e1;
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--neon);
    box-shadow: 0 0 30px rgba(20, 184, 166, 0.25);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.footer p {
    margin: 0.5rem 0;
}

/* ========== Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease;
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--surface);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

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

    .skill-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .skill-row-label {
        min-width: unset;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        margin-left: 30px;
    }

    .timeline-item::before {
        left: -45px;
    }
}

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

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}

/* ========== Scroll to Top ========== */
/* Was injected from script.js as an inline style block; moved here so the page
   carries no inline styles (keeps a future Content-Security-Policy simple). */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    z-index: 999;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.scroll-top-btn.visible {
    display: block;
}

.scroll-top-btn:hover {
    transform: scale(1.1);
}

/* ========== Motion Preferences ========== */
/* The page runs several infinite animations (blinking cursors, marquees,
   tickers, glow/spin on the paper card). Honour a reduced-motion request:
   hold everything on its final frame rather than removing the styling. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Marquee/ticker tracks are translated by their animation; without it they
       must sit at their start offset so no content is left clipped offscreen. */
    .logo-track,
    .ticker-inner,
    .ticker-inner-right {
        transform: none !important;
    }

    .logo-marquee,
    .ticker-row {
        overflow-x: auto;
    }

    /* Keep the terminal cursors legible instead of mid-blink. */
    .blink,
    .cursor {
        opacity: 1 !important;
    }
}
