:root {
    --bg: #ecf4f7;
    --surface: #ffffff;
    --surface-muted: #f7fbfd;
    --ink: #071a24;
    --muted: #5b6d7a;
    --accent: #0d9488;
    --accent-soft: #5eead4;
    --accent-dark: #0f4c5c;
    --border: rgba(7, 26, 36, 0.1);
    --radius-lg: 28px;
    --header-height: 78px;
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.65;
    color: var(--ink);
    background: radial-gradient(circle at top right, #f5fffd, var(--bg));
    font-size: 1rem;
    font-feature-settings: "liga" 1, "calt" 1;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body.nav-open {
    overflow: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-soft);
    outline-offset: 3px;
}

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

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

.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: -1;
}

.skip-link:focus {
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    overflow: visible;
    background: var(--accent-soft);
    color: #042027;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 1100;
}

/* Navigation */
header {
    background: rgba(4, 17, 25, 0.85);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.08em;
}

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

.nav-toggle {
    display: none;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.05);
    color: inherit;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    margin: 3px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-open .nav-toggle {
    border-color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.15);
}

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

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

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

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.nav-links a:hover {
    color: var(--accent-soft);
}

/* Hero Section */
.hero {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(94, 234, 212, 0.35), transparent 60%),
        linear-gradient(135deg, rgba(5, 19, 27, 0.92) 0%, rgba(8, 54, 63, 0.9) 60%, rgba(9, 75, 87, 0.88) 100%),
        url('hero-background.jpg');
    background-size: 150% 150%, cover, cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: screen, multiply, normal;
    color: white;
    padding: calc(60px + var(--header-height)) 0 70px;
    margin-top: 0;
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: calc(var(--header-height) + clamp(0.75rem, 2.5vw, 1.25rem));
    left: clamp(1rem, 3vw, 1.5rem);
    right: clamp(1rem, 3vw, 1.5rem);
    bottom: clamp(1rem, 3vw, 1.5rem);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    pointer-events: none;
}

.hero-grid {
    max-width: 840px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    text-align: center;
    align-items: center;
}

.hero h1 {
    font-size: clamp(1.8rem, 3.2vw, 2.3rem);
    margin-bottom: 0.75rem;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    font-weight: 600;
    line-height: 1.1;
}

.hero-description {
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    line-height: 1.45;
    color: rgba(255,255,255,0.85);
    max-width: 46ch;
}

.hero-expertise {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.hero-expertise li {
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.25rem;
    justify-content: center;
}

.hero-contact-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.hero-contact-icons a {
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.35), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 18px rgba(4, 17, 25, 0.25);
    position: relative;
}

.hero-contact-icons a:hover {
    color: var(--accent-soft);
    border-color: rgba(94, 234, 212, 0.5);
    box-shadow: 0 10px 24px rgba(94, 234, 212, 0.2);
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.4), rgba(255,255,255,0.08));
}

.hero-contact-icons svg {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
    transition: opacity 0.3s ease;
}

.hero-contact-icons a:hover svg {
    opacity: 0.95;
}

/* Sections */
.section {
    padding: 80px 0;
    position: relative;
    scroll-margin-top: calc(var(--header-height) + 20px);
}

.about-section {
    padding: clamp(36px, 7vh, 64px) 0 45px;
    display: flex;
    align-items: flex-start;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #0f4c5c;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #14b8a6, #5eead4);
    border-radius: 2px;
}

/* Research & Teaching Grid */
.research-grid,
.teaching-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

:is(.research-item, .teaching-item, .publication, .construction) {
    background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(246,252,252,0.94));
    padding: clamp(1.75rem, 3vw, 2.5rem);
    border-radius: 20px;
    border: 1px solid rgba(15, 76, 92, 0.08);
    box-shadow: 0 20px 45px rgba(7, 26, 36, 0.08);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

:is(.research-item, .publication, .construction):hover {
    transform: translateY(-4px);
    box-shadow: 0 38px 60px rgba(7, 26, 36, 0.12);
    border-color: rgba(20, 184, 166, 0.25);
}

.research-item h3 {
    color: #0f4c5c;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Publications */
.pub-section-title {
    color: #0f4c5c;
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #14b8a6;
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.pub-section-title:first-of-type {
    margin-top: 1rem;
}

.publication {
    margin-bottom: 2rem;
}

.publication h3 {
    color: #0f4c5c;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.authors {
    color: #666;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.journal {
    color: #888;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    text-decoration: none;
    transition: background var(--transition), box-shadow var(--transition), color var(--transition), border-color var(--transition);
    border: 1px solid transparent;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 18px rgba(20, 184, 166, 0.5);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
    color: #042027;
    box-shadow: 0 12px 30px rgba(20, 184, 166, 0.35);
}

.btn-accent:hover {
    box-shadow: 0 18px 38px rgba(20, 184, 166, 0.4);
}

.btn-ghost {
    border-color: rgba(255,255,255,0.4);
    color: white;
    background: transparent;
}

.btn-ghost:hover {
    border-color: rgba(255,255,255,0.8);
    color: var(--accent-soft);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    background: var(--surface);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-sm:hover {
    background: var(--accent);
    color: white;
}

/* About Section */
#about p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
    font-family: 'IBM Plex Serif', 'Times New Roman', serif;
    color: var(--muted);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: stretch;
}

.about-photo {
    width: 150px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(15, 76, 92, 0.12);
    box-shadow: 0 20px 35px rgba(7, 26, 36, 0.15);
    margin: 0 auto 1.25rem;
    filter: grayscale(1);
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: flex-start;
}

.quote-card {
    background: var(--surface-muted);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    font-family: 'IBM Plex Serif', serif;
    font-size: 1.05rem;
    color: var(--accent-dark);
    box-shadow: 0 8px 20px rgba(15, 76, 92, 0.08);
    width: 100%;
}

.about-quote {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.about-quote .quote-card {
    max-width: 720px;
    width: min(100%, 720px);
    margin: 0 auto;
}

.about-quote .quote-card span,
.about-quote .quote-card p {
    text-align: center;
}

.quote-card span {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

.about-text a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(13, 148, 136, 0.3);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.about-text a:hover {
    color: var(--accent-dark);
    border-color: rgba(15, 76, 92, 0.5);
}

.contact-box {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-muted) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(15, 76, 92, 0.08);
    border: 1px solid var(--border);
}

.contact-box h3 {
    color: #0f4c5c;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    margin-bottom: 1rem;
}

.contact-list strong {
    color: #0f4c5c;
    margin-right: 0.5rem;
}

.contact-list a {
    color: #14b8a6;
    text-decoration: none;
    word-break: break-word;
    transition: color 0.3s ease;
}

.contact-list a:hover {
    color: #0d9488;
    text-decoration: underline;
}

.focus-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 15px 40px rgba(7, 26, 36, 0.08);
}

.focus-card h3 {
    margin-bottom: 1rem;
    color: var(--accent-dark);
}

.focus-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.focus-list li {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(15, 76, 92, 0.12);
}

.focus-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.focus-title {
    font-weight: 600;
    color: var(--accent-dark);
    display: block;
}

.focus-meta {
    color: var(--muted);
    font-size: 0.95rem;
}


/* Section Introduction */
.section-intro {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Under Construction */
.construction {
    text-align: center;
    padding: clamp(2rem, 4vw, 3rem);
}

.construction p:first-child {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.construction p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.notebook-topics {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.notebook-topics li {
    padding: 0.5rem 0;
    color: #14b8a6;
}

.notebook-topics li:before {
    content: "📓 ";
    margin-right: 0.5rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #0f4c5c 0%, #14b8a6 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    nav .container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1.25rem;
        margin-top: 0.5rem;
        padding: 1.25rem;
        background: rgba(4, 17, 25, 0.95);
        border-radius: 16px;
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    }
    
    .nav-open .nav-links {
        display: flex;
    }
    
    .nav-links li {
        text-align: center;
    }
    
    .hero {
        padding: calc(90px + var(--header-height)) 0 60px;
        min-height: auto;
        align-items: flex-start;
    }

    .about-section {
        padding: 60px 0;
        min-height: auto;
        align-items: stretch;
    }

    .hero h1 {
        font-size: 2rem;
    }
    
    .research-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
