/* ============================================
   LORENZ MAIERHOFER - PERSONAL WEBSITE
   Cyberpunk aesthetic with AI/Data Science & P&G elements
   ============================================ */

/* CSS Variables */
:root {
    /* P&G Blue integrated with cyberpunk palette */
    --primary: #003DA5;
    --primary-light: #0052CC;
    --primary-dark: #002D7A;

    /* AI/Tech accent colors */
    --accent-cyan: #00D4FF;
    --accent-magenta: #FF00FF;
    --accent-green: #00FF88;
    --accent-purple: #8B5CF6;

    /* Neutral palette */
    --bg-dark: #0A0E17;
    --bg-darker: #050810;
    --bg-card: #111827;
    --bg-card-hover: #1F2937;

    --text-primary: #F0F4F8;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    --border-color: #1E293B;
    --border-accent: #334155;

    /* Glow effects */
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.3);
    --glow-magenta: 0 0 20px rgba(255, 0, 255, 0.3);
    --glow-primary: 0 0 20px rgba(0, 61, 165, 0.4);

    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'Space Mono', monospace;

    /* Spacing */
    --container-max: 1200px;
    --section-padding: 6rem;

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

/* Light mode */
[data-theme="light"] {
    --bg-dark: #F1F5F9;
    --bg-darker: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #E2E8F0;

    --text-primary: #020617;
    --text-secondary: #334155;
    --text-muted: #475569;

    --border-color: #CBD5E1;
    --border-accent: #94A3B8;

    /* Adjusted accent colors for better light mode visibility */
    --accent-cyan: #0891B2;
    --accent-magenta: #C026D3;
    --accent-green: #059669;
    --accent-purple: #7C3AED;

    --glow-cyan: 0 0 20px rgba(8, 145, 178, 0.25);
    --glow-magenta: 0 0 20px rgba(192, 38, 211, 0.25);
    --glow-primary: 0 0 20px rgba(0, 61, 165, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-heading);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.neural-network {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(0, 61, 165, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
    animation: pulse 8s ease-in-out infinite;
}

.data-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, var(--accent-cyan), transparent),
        radial-gradient(2px 2px at 40px 70px, var(--accent-magenta), transparent),
        radial-gradient(1px 1px at 90px 40px, var(--accent-green), transparent),
        radial-gradient(2px 2px at 160px 120px, var(--accent-cyan), transparent),
        radial-gradient(1px 1px at 230px 80px, var(--accent-purple), transparent);
    background-size: 250px 180px;
    opacity: 0.4;
    animation: float 20s linear infinite;
}

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

@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-180px); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-base);
}

[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.9);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

@keyframes blink {
    50% { opacity: 0; }
}

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

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
    transition: var(--transition-base);
}

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

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

/* Grimasso spotlight nav item */
.grimasso-nav {
    color: #33C759 !important;
    border: 1px solid rgba(51, 199, 89, 0.5);
    border-radius: 4px;
    padding: 0.2rem 0.65rem;
    position: relative;
    box-shadow: 0 0 8px rgba(51, 199, 89, 0.2), inset 0 0 6px rgba(51, 199, 89, 0.08);
    animation: grimasso-pulse 3s ease-in-out infinite;
    overflow: visible;
}

.grimasso-nav::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 4px;
    background: radial-gradient(ellipse at center, rgba(51, 199, 89, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.grimasso-nav::after {
    content: 'APP';
    position: absolute;
    top: -8px;
    right: -4px;
    font-size: 0.45rem;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    color: #33C759;
    background: var(--bg-primary);
    padding: 0 2px;
    line-height: 1;
    width: auto !important;
    height: auto !important;
    background-color: var(--bg-primary);
}

.grimasso-nav:hover,
.grimasso-nav.active {
    color: #33C759 !important;
    border-color: #33C759;
    box-shadow: 0 0 16px rgba(51, 199, 89, 0.45), inset 0 0 10px rgba(51, 199, 89, 0.12);
    transform: scale(1.04);
    background: rgba(51, 199, 89, 0.06);
}

/* Override the ::after underline animation for grimasso-nav */
.grimasso-nav:hover::after,
.grimasso-nav.active::after {
    width: auto !important;
    background: var(--bg-primary) !important;
}

@keyframes grimasso-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(51, 199, 89, 0.2), inset 0 0 6px rgba(51, 199, 89, 0.08); }
    50% { box-shadow: 0 0 14px rgba(51, 199, 89, 0.38), inset 0 0 10px rgba(51, 199, 89, 0.14); }
}

/* Hamburger button (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 5px 4px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-base);
    flex-shrink: 0;
}

.hamburger:hover,
.hamburger[aria-expanded="true"] {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    color: var(--accent-cyan);
}

.ham-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: var(--transition-base);
}

/* X animation when open */
.hamburger[aria-expanded="true"] .ham-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .ham-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger[aria-expanded="true"] .ham-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.nav-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: transparent;
    transition: var(--transition-base);
    letter-spacing: 0.05em;
}

.lang-switch:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition-base);
}

.social-link:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.theme-toggle:hover {
    color: var(--accent-magenta);
    border-color: var(--accent-magenta);
    box-shadow: var(--glow-magenta);
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

/* Main Content */
.main-content {
    padding-top: 80px;
}

/* Hero Section */
.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: 4rem 2rem;
}

.hero-container {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 4px;
}

.label-icon {
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.hero-title {
    font-family: var(--font-display);
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
}

.title-line.accent {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 50%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

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

.hero-location {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.hero-location svg {
    color: var(--accent-magenta);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 8px;
    transition: var(--transition-base);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    box-shadow: var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 61, 165, 0.5);
}

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

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-frame {
    position: relative;
    padding: 2rem;
}

.profile-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(0, 61, 165, 0.3) 0%, transparent 70%);
    filter: blur(40px);
    animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.profile-image {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow: var(--glow-primary);
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-darker) 100%);
}

.profile-placeholder .initials {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.profile-data {
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    min-width: 280px;
}

.data-point {
    flex: 1;
    text-align: center;
}

.data-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.data-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

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

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

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-magenta);
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 0, 255, 0.1);
    border-left: 3px solid var(--accent-magenta);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
}

/* About Section */
.about-section {
    padding: var(--section-padding) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 61, 165, 0.05) 50%, transparent 100%);
}

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

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

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition-base);
}

.stat-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateX(8px);
}

.stat-icon {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.stat-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-desc {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Experience Timeline */
.experience-section {
    padding: var(--section-padding) 0;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent-cyan) 50%, var(--accent-purple) 100%);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    transform: translateX(-50%);
    transition: var(--transition-base);
}

.timeline-item.current .timeline-marker {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.timeline-item:hover .timeline-marker {
    transform: translateX(-50%) scale(1.3);
    border-color: var(--accent-cyan);
}

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

.timeline-item:hover .timeline-content {
    border-color: var(--border-accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-badge {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    border-radius: 4px;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-company {
    font-size: 0.875rem;
    color: var(--accent-cyan);
    margin-bottom: 0.75rem;
}

.timeline-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Education Section */
.education-section {
    padding: var(--section-padding) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(139, 92, 246, 0.05) 50%, transparent 100%);
}

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

.education-card {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition-base);
}

.education-card:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
    transform: translateY(-4px);
}

.edu-icon {
    flex-shrink: 0;
    color: var(--accent-purple);
}

.edu-content h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.edu-degree {
    font-size: 0.9rem;
    color: var(--accent-cyan);
    margin-bottom: 0.25rem;
}

.edu-year {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

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

/* Expertise Section */
.expertise-section {
    padding: var(--section-padding) 0;
}

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

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

.expertise-card:hover {
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
    transform: translateY(-4px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-number {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    padding: 0.5rem 0.75rem;
    background: rgba(0, 61, 165, 0.1);
    border-radius: 6px;
}

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.expertise-card > p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Tags */
.card-tags,
.news-tags,
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.375rem 0.75rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: var(--accent-cyan);
    border-radius: 4px;
    transition: var(--transition-fast);
}

.tag:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--accent-cyan);
}

/* Page Header */
.page-header {
    padding: 4rem 0 2rem;
    text-align: center;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* LinkedIn Section */
.linkedin-section {
    padding: 2rem 0 var(--section-padding);
}

.linkedin-embeds {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 504px));
    gap: 2rem;
    margin-bottom: 2rem;
}

.linkedin-embed-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    overflow: hidden;
    transition: var(--transition-base);
}

.linkedin-embed-wrapper:hover {
    border-color: #0A66C2;
    box-shadow: 0 0 20px rgba(10, 102, 194, 0.2);
}

.linkedin-embed-wrapper iframe {
    width: 100%;
    max-width: 504px;
    border-radius: 8px;
    display: block;
}

.linkedin-cta {
    margin-top: 1.5rem;
}

.linkedin-cta .btn {
    gap: 0.75rem;
}

.linkedin-cta .btn svg {
    color: #0A66C2;
}

.linkedin-loading,
.linkedin-empty,
.linkedin-error {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 2rem;
    text-align: center;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}

.linkedin-error {
    color: var(--accent-magenta);
    border-color: var(--accent-magenta);
}

/* News Section */
.news-section {
    padding: 2rem 0 var(--section-padding);
}

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

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-base);
}

.news-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-4px);
}

.news-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 300px 1fr;
}

.news-image {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-card) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.news-placeholder {
    color: var(--primary);
    opacity: 0.5;
}

.news-content {
    padding: 2rem;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.news-category {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 61, 165, 0.1);
    border-left: 3px solid var(--primary);
    color: var(--primary);
}

[data-theme="light"] .news-category {
    color: var(--primary);
}

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

.news-card h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.news-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.news-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Topics Section */
.topics-section {
    padding: var(--section-padding) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 61, 165, 0.05) 50%, transparent 100%);
}

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

.topic-card {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    transition: var(--transition-base);
}

.topic-card:hover {
    border-color: var(--accent-magenta);
    box-shadow: var(--glow-magenta);
    transform: translateY(-4px);
}

.topic-icon {
    color: var(--accent-magenta);
    margin-bottom: 1rem;
}

.topic-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.topic-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Projects Section */
.projects-section {
    padding: 2rem 0 var(--section-padding);
}

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

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

.project-card:hover {
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
    transform: translateY(-4px);
}

.project-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 300px 1fr;
}

.project-visual {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-card) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 1.5rem;
}

.project-icon-large {
    color: var(--primary);
}

.project-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.active {
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.project-content {
    padding: 2rem;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-category {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 255, 136, 0.1);
    border-left: 3px solid var(--accent-green);
    color: var(--accent-green);
}

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

.project-card h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-card h2 a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

.project-card h2 a:hover {
    color: var(--accent-cyan);
    text-decoration: underline;
}

.project-card p a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: var(--transition-base);
}

.project-card p a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.project-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-highlights {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 61, 165, 0.05);
    border-radius: 8px;
}

.highlight {
    text-align: center;
}

.highlight-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.highlight-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

/* Tech Section */
.tech-section {
    padding: var(--section-padding) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(139, 92, 246, 0.05) 50%, transparent 100%);
}

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

.tech-category h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.tech-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-item {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

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

/* Footer */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.footer-logo .cursor {
    -webkit-text-fill-color: var(--accent-cyan);
    animation: blink 1s step-end infinite;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 400px;
}

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

.footer-links a {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.65rem;
    opacity: 0.6;
}

.footer-note a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-note a:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        order: -1;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-location {
        justify-content: center;
    }

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

    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stat-card {
        flex: 1;
        min-width: 200px;
    }

    .news-card.featured,
    .project-card.featured {
        grid-template-columns: 1fr;
    }

    .news-image,
    .project-visual {
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

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

    .profile-image {
        width: 260px;
        height: 260px;
    }

    .profile-glow {
        width: 300px;
        height: 300px;
    }

    .profile-frame {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 0;
    }

    .profile-data {
        position: static;
        transform: none;
        min-width: 260px;
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-visual {
        margin-bottom: 2rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-left: 1.5rem;
    }

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

    .education-card {
        flex-direction: column;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .project-highlights {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    /* Show hamburger */
    .hamburger {
        display: flex;
    }

    /* Nav panel: hidden via max-height/opacity (not display:none, so transitions work) */
    .nav-menu {
        display: flex;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 14, 23, 0.97);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border-color);
        border-top: 1px solid rgba(0, 212, 255, 0.15);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 0.25s ease;
        opacity: 0;
        pointer-events: none;
        z-index: 99;
    }

    .nav-menu.is-open {
        max-height: 280px;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-container {
        position: relative;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--border-color);
    }
    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        font-size: 0.875rem;
        padding: 0.9rem 1.5rem;
        letter-spacing: 0.12em;
    }

    /* Suppress underline animation in dropdown */
    .nav-link::after {
        display: none;
    }

    /* Active link: left accent bar instead of underline */
    .nav-link.active {
        color: var(--accent-cyan);
        border-left: 3px solid var(--accent-cyan);
        padding-left: calc(1.5rem - 3px);
        background: rgba(0, 212, 255, 0.05);
    }

    /* Grimasso link keeps its green glow in the dropdown */
    .grimasso-nav {
        margin: 0.5rem 1rem;
    }
    .grimasso-nav::after {
        display: block;
    }

    /* Light mode dropdown bg */
    [data-theme="light"] .nav-menu {
        background: rgba(248, 250, 252, 0.97);
    }

    /* Profile image — larger on mobile */
    .profile-image {
        width: 250px;
        height: 250px;
    }
    .profile-glow {
        width: 290px;
        height: 290px;
    }
    .profile-frame {
        gap: 1rem;
        padding: 0;
    }

    .profile-data {
        position: static;
        transform: none;
        min-width: 250px;
        padding: 0.75rem 1rem;
    }

    /* Hero spacing — release full-viewport lock */
    .hero {
        min-height: auto;
        padding: 1.5rem 1rem 2rem;
    }
    .hero-label {
        font-size: 0.6rem;
    }
    .title-line {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
    }
    .hero-visual {
        margin-bottom: 1rem;
    }
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
    .expertise-grid,
    .news-grid,
    .projects-grid,
    .topics-grid {
        grid-template-columns: 1fr;
    }
    .stat-card:hover {
        transform: none;
    }
}
