* {
    box-sizing: border-box;
}

:root {
    --bg: #080d18;
    --surface: rgba(15, 23, 42, 0.9);
    --surface-soft: rgba(30, 41, 59, 0.72);
    --text: #eef4ff;
    --muted: #a7b4c8;
    --primary: #38bdf8;
    --primary-dark: #2563eb;
    --accent: #f4a622;
    --navy: #f8fbff;
    --line: rgba(148, 163, 184, 0.22);
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
    --shadow-hover: 0 30px 78px rgba(0, 0, 0, 0.48);
    --radius: 8px;
    --motion: 0.25s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 30rem),
        radial-gradient(circle at bottom right, rgba(244, 166, 34, 0.14), transparent 28rem),
        linear-gradient(135deg, #080d18 0%, #101827 50%, #0f172a 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 72%);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--motion), transform var(--motion), box-shadow var(--motion), background var(--motion), border-color var(--motion);
}

a:hover {
    color: #7dd3fc;
}

.site {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 44px;
}

.reveal {
    animation: section-rise 0.7s ease both;
}

.reveal:nth-of-type(2) {
    animation-delay: 0.08s;
}

.reveal:nth-of-type(3) {
    animation-delay: 0.16s;
}

@keyframes section-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero,
.menu-banner {
    position: relative;
    overflow: hidden;
    padding: 34px 24px;
    text-align: center;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.9), rgba(37, 99, 235, 0.58)),
        url("fun.gif") center / cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero::after,
.menu-banner::after {
    content: "";
    position: absolute;
    inset: auto 18px 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--primary), transparent);
}

.hero h1,
.menu-banner h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.7rem);
    letter-spacing: 0;
}

.hero p {
    margin: 12px auto 0;
    max-width: 680px;
    color: #dbeafe;
    font-size: 1.05rem;
}

.nav,
.menu-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 18px 0 24px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.nav-links,
.menu-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nav-with-brand {
    justify-content: center;
}

.profile-logo-section {
    display: flex;
    justify-content: center;
    margin: 18px 0 0;
}

/* Separate clickable profile logo used above the navigation. */
.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 6px 12px 6px 6px;
    color: #ffffff;
    font-weight: 800;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(125, 211, 252, 0.3);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.26), 0 0 24px rgba(56, 189, 248, 0.1);
    backdrop-filter: blur(14px);
}

.nav-brand img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(125, 211, 252, 0.8);
}

.nav-brand:hover {
    color: #ffffff;
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.48);
    box-shadow: 0 16px 34px rgba(56, 189, 248, 0.18);
}

.nav-links a,
.nav > a:not(.nav-brand),
.menu-links a,
.back a,
button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    color: #ffffff;
    font-weight: 700;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-dark), #1d4ed8);
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-links a:hover,
.nav > a:not(.nav-brand):hover,
.menu-links a:hover,
.back a:hover,
.button:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #d97706);
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(31, 111, 235, 0.3);
}

.portfolio-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.78fr);
    gap: clamp(22px, 5vw, 48px);
    align-items: center;
    margin-bottom: 24px;
    padding: clamp(24px, 5vw, 52px);
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.94), rgba(30, 64, 175, 0.68)),
        radial-gradient(circle at 84% 18%, rgba(56, 189, 248, 0.22), transparent 18rem);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.portfolio-hero::before {
    content: "";
    position: absolute;
    inset: 18px;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
}

.portfolio-hero::after,
.contact-panel::after {
    content: "";
    position: absolute;
    inset: auto 22px 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}

.hero-copy,
.profile-card,
.contact-panel > *,
.intro-card > *,
.quick-card > * {
    position: relative;
    z-index: 1;
}

.eyebrow,
.profile-tag {
    margin: 0 0 10px;
    color: #7dd3fc;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 680px;
    margin: 0 0 16px;
    color: #ffffff;
    font-size: clamp(2.15rem, 5vw, 4.4rem);
}

.hero-copy p {
    max-width: 650px;
    color: #dbeafe;
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.button-ghost {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(125, 211, 252, 0.38);
    box-shadow: none;
}

/* Homepage portfolio sections keep the existing dark blue glass style. */
.profile-card {
    padding: 14px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: var(--radius);
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.44), 0 0 34px rgba(56, 189, 248, 0.12);
    transition: transform var(--motion), box-shadow var(--motion), border-color var(--motion);
}

.profile-card:hover {
    transform: translateY(-6px);
    border-color: rgba(125, 211, 252, 0.56);
    box-shadow: var(--shadow-hover), 0 0 42px rgba(56, 189, 248, 0.2);
}

.profile-card-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.profile-card-body {
    padding: 18px 8px 6px;
}

.profile-card-body h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.intro-card {
    position: relative;
    overflow: hidden;
}

.intro-card::before,
.quick-card::before,
.contact-panel::before {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), transparent 45%);
    opacity: 0.72;
}

.intro-card h2 {
    margin-top: 0;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.quick-card,
.contact-panel {
    position: relative;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    transition: transform var(--motion), box-shadow var(--motion), border-color var(--motion);
}

.quick-card {
    padding: 22px;
}

.quick-card:hover,
.contact-panel:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: var(--shadow-hover), 0 0 30px rgba(56, 189, 248, 0.12);
}

.quick-card h3 {
    margin-top: 0;
    color: #ffffff;
}

.quick-card p,
.contact-panel p {
    margin-bottom: 0;
}

.contact-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
    gap: 24px;
    align-items: center;
    padding: clamp(22px, 4vw, 34px);
}

.contact-panel h2 {
    margin-top: 0;
}

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

.social-buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 14px;
    color: #ffffff;
    font-weight: 800;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.94), rgba(14, 165, 233, 0.78));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.2);
}

.social-buttons a:hover {
    color: #ffffff;
    transform: translateY(-3px);
    background: linear-gradient(135deg, var(--accent), #2563eb);
    box-shadow: 0 18px 36px rgba(56, 189, 248, 0.24);
}

.card,
.content-card,
table,
blockquote,
.media-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.content-card {
    margin-bottom: 24px;
    padding: clamp(20px, 4vw, 34px);
    backdrop-filter: blur(12px);
    transition: transform var(--motion), box-shadow var(--motion), border-color var(--motion);
}

.content-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.38);
    box-shadow: var(--shadow-hover);
}

h1,
h2,
h3 {
    color: var(--navy);
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 12px;
}

h2 {
    margin-top: 28px;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

h3 {
    margin-bottom: 8px;
    color: var(--primary-dark);
}

p {
    max-width: 760px;
    color: var(--muted);
}

hr {
    height: 1px;
    margin: 24px 0;
    border: 0;
    background: var(--line);
}

img,
video {
    max-width: 100%;
    height: auto;
}

img {
    border-radius: var(--radius);
}

.feature-image,
.profile-image,
.gallery img,
td img {
    object-fit: cover;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.36);
    transition: transform var(--motion), box-shadow var(--motion), filter var(--motion);
}

.feature-image:hover,
.profile-image:hover,
.gallery img:hover,
td img:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: var(--shadow-hover);
    filter: saturate(1.05);
}

.intro,
.centered {
    text-align: center;
}

.intro p,
.centered p {
    margin-left: auto;
    margin-right: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin: 18px 0 8px;
}

.social-links img {
    width: 54px;
    height: 54px;
    padding: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    transition: transform var(--motion), box-shadow var(--motion), border-color var(--motion);
}

.social-links a:hover img {
    transform: translateY(-4px) scale(1.05);
    border-color: rgba(31, 111, 235, 0.34);
    box-shadow: var(--shadow-hover);
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

th,
td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

th {
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #2563eb);
}

td {
    color: var(--muted);
}

tr:nth-child(even) td {
    background: var(--surface-soft);
}

.gallery-table {
    width: min(760px, 100%);
    margin: 24px auto;
}

.gallery-table td {
    padding: 18px;
    text-align: center;
    vertical-align: top;
}

.gallery-table a {
    display: block;
    padding: 14px;
    color: var(--text);
    font-weight: 700;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.gallery-table a:hover {
    color: #7dd3fc;
    transform: translateY(-4px);
    border-color: rgba(31, 111, 235, 0.28);
    box-shadow: var(--shadow-hover);
}

.gallery-table img {
    width: 100%;
    max-width: 240px;
    height: 260px;
    margin-bottom: 10px;
}

.gallery {
    width: min(1100px, calc(100% - 32px));
    margin: 32px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.gallery img {
    width: 100%;
    height: 360px;
}

.portrait-gallery img {
    height: 520px;
}

.back {
    margin: 28px auto;
    text-align: center;
}

.notice,
marquee {
    display: block;
    width: 100%;
    margin: 22px 0;
    padding: 10px 14px;
    color: #fde68a;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.45), rgba(30, 41, 59, 0.84));
    border: 1px solid rgba(244, 166, 34, 0.42);
    border-radius: var(--radius);
    box-shadow: 0 10px 24px rgba(120, 53, 15, 0.08);
}

ul,
ol {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    padding: 18px 24px 18px 40px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

blockquote {
    margin: 20px 0;
    padding: 18px 22px;
    color: #dbeafe;
    font-size: 1.2rem;
    font-weight: 700;
    border-left: 5px solid var(--accent);
}

mark {
    padding: 2px 5px;
    border-radius: 5px;
    color: #0f172a;
    background: #fde68a;
}

footer,
.footer {
    margin-top: 32px;
    color: var(--muted);
    text-align: center;
}

footer p,
.footer {
    color: var(--muted);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 22px;
}

.media-card {
    padding: 16px;
    transition: transform var(--motion), box-shadow var(--motion), border-color var(--motion);
}

.media-card:hover {
    transform: translateY(-4px);
    border-color: rgba(31, 111, 235, 0.26);
    box-shadow: var(--shadow-hover);
}

audio {
    width: 100%;
    border-radius: var(--radius);
}

video {
    width: 380px;
    height: auto;
    border-radius: var(--radius);
    display: block;
    margin: auto;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

@media (max-width: 640px) {
    .site {
        width: min(100% - 20px, 1120px);
        padding-top: 16px;
    }

    .portfolio-hero,
    .contact-panel {
        grid-template-columns: 1fr;
    }

    .portfolio-hero {
        padding: 24px 16px;
    }

    .quick-grid,
    .social-buttons {
        grid-template-columns: 1fr;
    }

    .nav {
        justify-content: center;
    }

    .nav-brand {
        width: min(100%, 320px);
        justify-content: center;
    }

    .nav-links {
        width: 100%;
    }

    .hero,
    .menu-banner {
        padding: 28px 16px;
    }

    .nav-links a,
    .nav > a:not(.nav-brand),
    .menu-links a {
        width: 100%;
    }

    .gallery-table,
    .gallery-table tbody,
    .gallery-table tr,
    .gallery-table td {
        display: block;
        width: 100%;
    }

    .gallery img,
    .portrait-gallery img {
        height: 320px;
    }

    th,
    td {
        padding: 10px;
        font-size: 0.92rem;
    }
}
