:root {
    --bg: #09111f;
    --bg-alt: #0f1b31;
    --panel: #13233f;
    --panel-soft: #eef3fb;
    --text: #0d1728;
    --text-soft: #4d5c77;
    --white: #f8fbff;
    --border: rgba(87, 116, 166, 0.22);
    --accent: #58c4dd;
    --accent-strong: #2f88ff;
    --shadow: 0 24px 60px rgba(8, 19, 42, 0.16);
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f6f8fc;
    color: var(--text);
    font-family: "Instrument Sans", sans-serif;
    line-height: 1.65;
    font-size: 18px;
}

h1,
h2,
h3,
.brand,
.button,
.section-label {
    font-family: "Space Grotesk", sans-serif;
}

h1,
h2,
h3,
p,
ul {
    margin-top: 0;
}

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

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1120px, calc(100% - 48px));
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(9, 17, 31, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner,
.footer-inner,
.contact-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-inner {
    min-height: 86px;
}

.brand {
    color: var(--white);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.nav-links a {
    color: rgba(248, 251, 255, 0.78);
    font-size: 1.08rem;
    font-weight: 600;
}

.nav-links a:hover,
.footer-social a:hover {
    color: var(--accent);
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 138px 0 126px;
    background:
        radial-gradient(circle at top left, rgba(88, 196, 221, 0.18), transparent 32%),
        radial-gradient(circle at 80% 20%, rgba(47, 136, 255, 0.24), transparent 28%),
        linear-gradient(135deg, #08101e 0%, #112343 52%, #0b1730 100%);
    color: var(--white);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.92), transparent);
    pointer-events: none;
}

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

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 470px);
    align-items: center;
    gap: 56px;
}

.hero-text {
    max-width: 720px;
}

.eyebrow,
.section-label,
.project-kicker {
    margin-bottom: 18px;
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(3.4rem, 5.8vw, 5.2rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy {
    margin: 28px 0 0;
    color: rgba(248, 251, 255, 0.82);
    font-size: 1.38rem;
    line-height: 1.7;
}

.hero-visual {
    position: relative;
    min-height: 640px;
    isolation: isolate;
}

.hero-visual::before,
.hero-visual::after {
    content: "";
    position: absolute;
    border-radius: 34px;
    pointer-events: none;
}

.hero-visual::before {
    inset: 42px 52px 128px -6px;
    background: linear-gradient(145deg, rgba(84, 188, 255, 0.16), rgba(72, 117, 255, 0.08));
    filter: blur(0.5px);
    z-index: 0;
}

.hero-visual::after {
    right: 12px;
    bottom: 76px;
    width: 210px;
    height: 248px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.2), rgba(72, 117, 255, 0.14));
    box-shadow: 0 30px 70px rgba(17, 45, 92, 0.24);
    z-index: 1;
}

.hero-photo-card,
.hero-badge {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(2, 8, 23, 0.38);
}

.hero-photo-card {
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    z-index: 2;
}

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

.hero-photo-main {
    inset: 8px 46px 108px 24px;
    transform: rotate(-2.5deg);
}

.hero-photo-secondary {
    right: 8px;
    bottom: 22px;
    width: min(39%, 228px);
    aspect-ratio: 0.82 / 1;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 28px 58px rgba(4, 10, 24, 0.4);
    transform: rotate(8deg);
    z-index: 3;
}

.hero-photo-secondary img {
    object-position: center 26%;
}

.hero-badge {
    left: 0;
    bottom: 0;
    max-width: 290px;
    padding: 22px 24px;
    border-radius: 22px;
    background: rgba(10, 18, 34, 0.88);
    backdrop-filter: blur(10px);
    z-index: 4;
}

.hero-badge-label {
    display: block;
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-badge strong {
    font-size: 1.18rem;
    line-height: 1.5;
}

.hero-actions,
.project-actions,
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-actions {
    margin: 38px 0 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0 28px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #07101d;
    box-shadow: 0 16px 30px rgba(47, 136, 255, 0.22);
}

.button-secondary {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.03);
    color: var(--white);
}

.section-light .button-secondary,
.section-muted .button-secondary,
#projects .button-secondary,
#contact .button-secondary {
    color: var(--text);
    border-color: var(--border);
    background: #fff;
}

.hero-stack,
.tag-row,
.impact-list {
    padding-left: 0;
    list-style: none;
}

.hero-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0;
}

.hero-stack li,
.tag-row span {
    border-radius: 999px;
    padding: 10px 16px;
}

.hero-stack li {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(248, 251, 255, 0.88);
    font-size: 1rem;
}

.section {
    padding: 92px 0;
}

.section-light {
    background: #f6f8fc;
}

.section-dark {
    background:
        radial-gradient(circle at top right, rgba(88, 196, 221, 0.1), transparent 25%),
        linear-gradient(180deg, #0d172b 0%, #13223d 100%);
    color: var(--white);
}

.section-muted {
    background: linear-gradient(180deg, #edf3fb 0%, #e8effa 100%);
}

.section-heading {
    max-width: 860px;
    margin-bottom: 52px;
}

.section-heading h2 {
    font-size: clamp(2.5rem, 4vw, 3.6rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.about-grid,
.projects-grid,
.skills-grid {
    display: grid;
    gap: 28px;
}

.about-grid {
    grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
}

.about-photo-wrap {
    position: relative;
}

.about-photo-wrap::after {
    content: "";
    position: absolute;
    inset: auto -20px -20px 24px;
    height: 100%;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(88, 196, 221, 0.22), rgba(47, 136, 255, 0.18));
    z-index: 0;
}

.profile-photo {
    position: relative;
    z-index: 1;
    border-radius: 32px;
    box-shadow: var(--shadow);
    aspect-ratio: 1 / 1.08;
    object-fit: cover;
    object-position: center 18%;
}

.about-photo-single {
    max-width: 430px;
}

.about-photo-single .profile-photo {
    aspect-ratio: 1 / 1.16;
    object-position: center 8%;
}

.about-copy {
    font-size: 1.28rem;
    line-height: 1.9;
    color: var(--text-soft);
}

.about-copy p + p {
    margin-top: 18px;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.story-card {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-rows: 340px 1fr;
}

.story-image {
    width: 100%;
    height: 340px;
    object-fit: cover;
    object-position: center;
}

.story-image-library {
    object-position: center 28%;
}

.story-image-stone {
    object-position: center 34%;
}

.story-image-summit {
    object-position: center 56%;
}

.story-copy {
    padding: 22px 24px 26px;
}

.story-copy h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.story-copy p {
    margin-bottom: 0;
    color: var(--text-soft);
    font-size: 1.08rem;
    line-height: 1.8;
}

.experience-list {
    display: grid;
    gap: 24px;
}

.experience-card,
.project-card,
.skill-card,
.contact-panel {
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.experience-card {
    padding: 34px;
    background: rgba(255, 255, 255, 0.06);
}

.experience-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.experience-card h3,
.project-card h3,
.skill-card h3 {
    font-size: 1.78rem;
    margin-bottom: 8px;
}

.experience-company,
.experience-meta {
    margin-bottom: 0;
    color: rgba(248, 251, 255, 0.72);
    font-size: 1.04rem;
}

.experience-company {
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: rgba(248, 251, 255, 0.94);
}

.experience-company a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(88, 196, 221, 0.34);
    padding-bottom: 2px;
    transition: color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.experience-company a:hover,
.experience-company a:focus-visible {
    color: #ffffff;
    border-color: rgba(88, 196, 221, 0.95);
}

.impact-list {
    margin: 20px 0 0;
}

.impact-list li {
    position: relative;
    padding-left: 22px;
    margin-top: 10px;
    font-size: 1.06rem;
    line-height: 1.75;
}

.impact-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.extra-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.extra-card {
    padding: 32px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.96) 100%);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.extra-card h3 {
    font-size: 1.62rem;
    margin-bottom: 14px;
}

.extra-card p {
    color: var(--text-soft);
    font-size: 1.08rem;
    line-height: 1.82;
    margin-bottom: 0;
}

.project-card {
    padding: 34px;
    background: #fff;
}

.project-card-featured {
    grid-column: span 2;
    background:
        radial-gradient(circle at top right, rgba(88, 196, 221, 0.13), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.project-card p,
.skill-card p,
.contact-copy {
    color: var(--text-soft);
    font-size: 1.08rem;
    line-height: 1.8;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 0;
}

.tag-row span {
    background: var(--panel-soft);
    color: #28405e;
    font-size: 0.98rem;
    font-weight: 600;
}

.project-actions {
    margin-top: 24px;
}

.skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-card {
    min-height: 210px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.82);
}

.contact-panel {
    padding: 48px;
    background:
        radial-gradient(circle at top right, rgba(88, 196, 221, 0.12), transparent 26%),
        #fff;
}

.contact-panel h2 {
    font-size: clamp(2.2rem, 3vw, 3rem);
}

.site-footer {
    padding: 28px 0 34px;
    background: #08101d;
    color: rgba(248, 251, 255, 0.75);
}

.footer-social {
    display: flex;
    gap: 18px;
}

.footer-social a {
    color: rgba(248, 251, 255, 0.75);
    font-size: 1.25rem;
}

@media (max-width: 992px) {
    .projects-grid,
    .extra-grid,
    .skills-grid,
    .about-grid,
    .story-grid {
        grid-template-columns: 1fr;
    }

    .hero-layout {
        grid-template-columns: 1fr;
    }

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

    .contact-panel,
    .experience-header,
    .nav-inner,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-visual {
        min-height: auto;
    }

    .hero-photo-card,
    .hero-badge,
    .about-photo-single {
        position: relative;
        inset: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: auto;
        height: auto;
        transform: none;
    }

    .hero-visual {
        display: grid;
        gap: 18px;
    }

    .hero-photo-main {
        min-height: 420px;
    }
}

@media (max-width: 768px) {
    .container {
        width: min(100% - 32px, 1120px);
    }

    .site-nav {
        position: static;
    }

    .hero {
        padding: 96px 0 84px;
    }

    .hero-copy {
        font-size: 1.12rem;
    }

    .section {
        padding: 74px 0;
    }

    .experience-card,
    .project-card,
    .extra-card,
    .skill-card,
    .contact-panel {
        padding: 24px;
        border-radius: 22px;
    }

    .brand {
        font-size: 1.25rem;
    }

    .nav-links a {
        font-size: 1rem;
    }

    .hero h1 {
        font-size: clamp(2.7rem, 10vw, 4rem);
    }
}
