@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@300;400;500;600;700&display=swap');

/* === Smooth scroll & page reveal === */
html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

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

:root {
    --bg-color: #050508;
    --text-color: #f3f4f6;
    --heading-color: #ffffff;
    --accent-color: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.12);
    --accent-2: #818cf8;
    --secondary-text: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.07);
    --card-bg: rgba(255, 255, 255, 0.01);
    --card-hover-bg: rgba(255, 255, 255, 0.03);

    /* Typography */
    --font-family: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --line-height: 1.7;
}

::selection {
    background: rgba(56, 189, 248, 0.25);
    color: #ffffff;
}

:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
    border-radius: 2px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: var(--line-height);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    animation: pageReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.04) 0%, transparent 60%),
        radial-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 100% 100%, 24px 24px;
    overflow-x: hidden;
}

/* === Ambient aurora — two soft drifting fields, GPU-cheap (transform only) === */
body::before,
body::after {
    content: '';
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}

body::before {
    width: 60vmax;
    height: 60vmax;
    top: -24vmax;
    left: -16vmax;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.055) 0%, transparent 62%);
    animation: auroraDrift1 52s ease-in-out infinite alternate;
}

body::after {
    width: 52vmax;
    height: 52vmax;
    bottom: -22vmax;
    right: -16vmax;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.045) 0%, transparent 62%);
    animation: auroraDrift2 64s ease-in-out infinite alternate;
}

@keyframes auroraDrift1 {
    to { transform: translate(10vmax, 8vmax) scale(1.15); }
}

@keyframes auroraDrift2 {
    to { transform: translate(-9vmax, -7vmax) scale(1.1); }
}

/* === Scroll progress bar === */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-2));
    z-index: 200;
    pointer-events: none;
    transition: width 0.1s linear;
}

header {
    padding: 6rem 2rem 4rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

/* Fine grid overlay in header */
header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.4;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
}

/* Radial glow behind profile image */
header::after {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.header-container {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* === Portrait: grayscale, wrapped in a slow-rotating hairline ring === */
.portrait-frame {
    position: relative;
    width: 138px;
    height: 138px;
    margin: 0 auto 1.75rem;
}

.portrait-frame::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(56, 189, 248, 0.55) 42deg,
        transparent 118deg,
        transparent 196deg,
        rgba(129, 140, 248, 0.4) 262deg,
        transparent 334deg
    );
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
    animation: ringSpin 16s linear infinite;
    pointer-events: none;
}

@keyframes ringSpin {
    to { transform: rotate(360deg); }
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.02), 0 20px 40px rgba(0, 0, 0, 0.6);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subpages render the image without the frame wrapper */
:not(.portrait-frame) > .profile-image {
    width: 130px;
    height: 130px;
    margin: 0 auto 1.75rem;
}

.portrait-frame > .profile-image {
    margin-bottom: 0;
}

.profile-image:hover {
    filter: grayscale(15%);
    transform: scale(1.03);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 8px var(--accent-glow), 0 20px 50px rgba(0, 0, 0, 0.8);
}

h1, h2, h3, h4, h5, h6, .subtitle, nav a {
    font-family: var(--font-heading);
    font-weight: 500;
}

h1 {
    font-size: 2.75rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--heading-color);
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #ffffff 55%, #b9d4e8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.mission-statement {
    max-width: 640px;
    margin: 1.5rem auto 0;
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--secondary-text);
    line-height: 1.9;
}

.mission-statement a {
    color: var(--accent-color);
    text-decoration-color: rgba(56, 189, 248, 0.3);
}

.mission-statement a:hover {
    color: var(--heading-color);
    text-decoration-color: var(--heading-color);
}

/* === Identity / social icon row === */
.identity-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.75rem;
}

.identity-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    color: var(--secondary-text);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.identity-links a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.identity-links a:hover {
    color: var(--accent-color);
    border-color: rgba(56, 189, 248, 0.4);
    background: var(--accent-glow);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* === Stat strip === */
.stat-strip {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin: 2.5rem auto 0;
    max-width: 640px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
}

.stat-strip .stat {
    flex: 1 1 20%;
    min-width: 100px;
    box-sizing: border-box;
    padding: 0.9rem 0.5rem;
    text-align: center;
    border-right: 1px solid var(--border-color);
}

.stat-strip .stat:last-child {
    border-right: none;
}

.stat-strip .stat-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--heading-color);
    letter-spacing: -0.01em;
}

.stat-strip .stat-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--secondary-text);
    margin-top: 0.15rem;
}

/* Navigation */
nav.jump-nav {
    display: flex;
    justify-content: center;
    gap: 1.75rem;
    padding: 1.1rem;
    background-color: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

nav.jump-nav a {
    color: var(--secondary-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.25s, transform 0.25s;
    position: relative;
}

nav.jump-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.jump-nav a:hover {
    color: var(--heading-color);
}

nav.jump-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

nav.jump-nav a.active {
    color: var(--accent-color);
}

nav.jump-nav a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Main Content */
main {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

section {
    margin-bottom: 5rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--heading-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
}

h2::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    margin-right: 0.75rem;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

h3 {
    font-size: 1.15rem;
    font-weight: 500;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

/* Custom list layout */
ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0 0 1.5rem 0;
}

li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.95rem;
    color: var(--secondary-text);
}

li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: -1px;
    color: var(--accent-color);
    font-size: 1rem;
}

a {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.15);
    text-underline-offset: 4px;
    transition: all 0.25s ease;
}

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

/* AI Summary Block */
.ai-summary {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
    padding: 1.25rem;
    margin-bottom: 3rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--secondary-text);
    border-radius: 4px;
    backdrop-filter: blur(8px);
}

/* Custom Search & Form Elements */
.search-container {
    margin-bottom: 3rem;
}

.search-container form {
    display: flex;
    gap: 0.5rem;
    max-width: 100%;
}

input[type="text"],
input[type="email"],
textarea {
    flex-grow: 1;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 0.9rem;
    border-radius: 4px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

button[type="submit"],
.search-container button {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--heading-color);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-height: 44px;
}

button[type="submit"]:hover,
.search-container button:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #050508;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--heading-color);
}


/* Resume Styling (Career Items) */
.career-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Top sheen line that lights up on hover */
.career-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.career-item:hover {
    background-color: var(--card-hover-bg);
    border-color: rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.career-item:hover::before {
    opacity: 1;
}

.career-item h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.career-item .role {
    font-family: var(--font-family);
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 400;
}

.career-item ul {
    margin-bottom: 0;
}

.career-item li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.career-item li:last-child {
    margin-bottom: 0;
}

/* Section Header Meta */
.section-meta {
    color: var(--secondary-text);
    font-size: 0.9rem;
    margin-top: -1.25rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Item annotations (replaces inline-styled spans) */
.item-note {
    font-size: 0.9em;
    color: var(--secondary-text);
}

/* Disclaimer blocks */
.disclaimer-box {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--secondary-text);
    line-height: 1.6;
}

.disclaimer-box strong {
    color: var(--heading-color);
}

/* CV download button */
.cv-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.7rem 1.3rem;
    min-height: 44px;
    box-sizing: border-box;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    color: var(--heading-color);
    transition: all 0.3s ease;
}

.cv-button:hover {
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--heading-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Footer styling */
footer {
    text-align: center;
    padding: 4rem 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--secondary-text);
    background-color: rgba(3, 7, 18, 0.4);
}

footer nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

footer nav a {
    color: var(--secondary-text);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.25s;
}

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

footer p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

footer code {
    font-size: 0.75rem;
    color: var(--accent-color);
    word-break: break-all;
}

/* Fade-in animation — staggered */
.fade-in {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--stagger-delay, 0ms);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Verification list styles */
.verification-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--accent-color);
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 500;
}

/* === Reduced motion: honor the preference, kill all ambient animation === */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    body,
    body::before,
    body::after,
    .portrait-frame::before {
        animation: none;
    }

    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .career-item,
    .identity-links a,
    .profile-image {
        transition: none;
    }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    header {
        padding: 4rem 1rem 3rem;
    }

    .portrait-frame {
        width: 110px;
        height: 110px;
    }

    :not(.portrait-frame) > .profile-image {
        width: 110px;
        height: 110px;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .stat-strip .stat {
        flex: 1 1 33%;
        min-width: 90px;
        border-bottom: 1px solid var(--border-color);
    }

    nav.jump-nav {
        gap: 1.25rem;
        padding: 0.9rem 1rem;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    nav.jump-nav::-webkit-scrollbar {
        display: none;
    }

    nav.jump-nav a {
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    main {
        padding: 2rem 1rem;
    }

    section {
        margin-bottom: 4rem;
    }

    h2 {
        font-size: 1.15rem;
    }

    .career-item {
        padding: 1.25rem;
    }
}
