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

:root {
    --bg: #030712;
    --bg-soft: #07101f;
    --page-gradient:
        radial-gradient(circle at 12% 6%, rgba(124, 58, 237, 0.34), transparent 26rem),
        radial-gradient(circle at 86% 14%, rgba(34, 211, 238, 0.22), transparent 28rem),
        radial-gradient(circle at 52% 62%, rgba(37, 99, 235, 0.12), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #07111f 46%, #030712 100%);
    --grid-color: rgba(255, 255, 255, 0.032);
    --beam: rgba(34, 211, 238, 0.055);
    --section-wash: rgba(255, 255, 255, 0.018);
    --surface: rgba(15, 23, 42, 0.7);
    --surface-strong: rgba(15, 23, 42, 0.94);
    --surface-elevated: rgba(20, 30, 52, 0.82);
    --surface-muted: rgba(255, 255, 255, 0.052);
    --surface-glow: rgba(34, 211, 238, 0.09);
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(56, 189, 248, 0.42);
    --text: #f8fafc;
    --heading: #ffffff;
    --muted: #b3bfd3;
    --subtle: #6f7b91;
    --primary: #7c3aed;
    --primary-2: #2563eb;
    --accent: #22d3ee;
    --accent-soft: rgba(34, 211, 238, 0.12);
    --ring: rgba(34, 211, 238, 0.42);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --shadow-soft: 0 18px 54px rgba(0, 0, 0, 0.24);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --container: 1180px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body:has(.theme-toggle-input:checked) {
    --bg: #f8fbff;
    --bg-soft: #edf5ff;
    --page-gradient:
        radial-gradient(circle at 9% 4%, rgba(124, 58, 237, 0.15), transparent 25rem),
        radial-gradient(circle at 88% 10%, rgba(8, 145, 178, 0.16), transparent 27rem),
        radial-gradient(circle at 48% 56%, rgba(37, 99, 235, 0.09), transparent 32rem),
        linear-gradient(180deg, #ffffff 0%, #eef6ff 48%, #f8fbff 100%);
    --grid-color: rgba(15, 23, 42, 0.052);
    --beam: rgba(37, 99, 235, 0.055);
    --section-wash: rgba(37, 99, 235, 0.035);
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: rgba(255, 255, 255, 0.97);
    --surface-elevated: rgba(255, 255, 255, 0.9);
    --surface-muted: rgba(15, 23, 42, 0.055);
    --surface-glow: rgba(8, 145, 178, 0.075);
    --border: rgba(15, 23, 42, 0.12);
    --border-strong: rgba(8, 145, 178, 0.34);
    --text: #0f172a;
    --heading: #08111f;
    --muted: #475569;
    --subtle: #64748b;
    --primary: #6d28d9;
    --primary-2: #2563eb;
    --accent: #0891b2;
    --accent-soft: rgba(8, 145, 178, 0.1);
    --ring: rgba(8, 145, 178, 0.32);
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.13);
    --shadow-soft: 0 18px 46px rgba(15, 23, 42, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

body {
    min-height: 100vh;
    background: var(--page-gradient);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
        linear-gradient(115deg, transparent 0%, transparent 38%, var(--beam) 46%, transparent 58%, transparent 100%);
    background-size: 56px 56px, 56px 56px, 100% 100%;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.86), transparent 78%);
}

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

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

ul {
    list-style-position: inside;
}

h1,
h2,
h3 {
    color: var(--heading);
    font-family: 'Outfit', 'Inter', sans-serif;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

h1 {
    max-width: 760px;
    font-size: clamp(3rem, 7vw, 6.4rem);
    font-weight: 800;
}

h2 {
    max-width: 720px;
    font-size: clamp(2.1rem, 4.6vw, 4.25rem);
    font-weight: 800;
}

h3 {
    font-size: 1.35rem;
}

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

a:focus-visible,
input:focus-visible,
label:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 5px;
}

.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: 100%;
    padding: 1rem 0;
    pointer-events: none;
}

.navbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100% - 2rem, 1060px);
    margin-inline: auto;
    padding: 0.85rem 1rem 0.85rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
        rgba(3, 7, 18, 0.76);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    pointer-events: auto;
}

body:has(.theme-toggle-input:checked) .navbar {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(237, 245, 255, 0.72)),
        rgba(255, 255, 255, 0.78);
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.nav-links {
    order: 2;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    list-style: none;
}

.nav-links a {
    display: inline-flex;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover {
    background: var(--surface-muted);
    color: var(--text);
}

.theme-switch {
    order: 3;
    display: flex;
    align-items: center;
    margin-left: 0.75rem;
}

.theme-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-toggle-label {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 4.25rem;
    height: 2.25rem;
    padding: 0 0.42rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-muted);
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease;
}

.theme-toggle-label:hover {
    border-color: var(--border-strong);
}

.theme-toggle-input:focus-visible + .theme-toggle-label {
    outline: 3px solid var(--accent);
    outline-offset: 5px;
}

.theme-icon {
    position: relative;
    z-index: 1;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.theme-toggle-thumb {
    position: absolute;
    top: 0.28rem;
    left: 0.3rem;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.26);
    transition: transform 220ms var(--ease);
}

.theme-toggle-input:checked + .theme-toggle-label .theme-toggle-thumb {
    transform: translateX(1.98rem);
}

.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nav-toggle:focus-visible + .menu-toggle {
    outline: 3px solid var(--accent);
    outline-offset: 5px;
}

.menu-toggle {
    order: 4;
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    gap: 0.24rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 1rem;
    height: 2px;
    border-radius: 99px;
    background: var(--text);
}

.hero {
    position: relative;
    min-height: 100vh;
    padding: 9.5rem 0 5.5rem;
    display: grid;
    align-items: center;
}

.hero::after {
    content: '';
    position: absolute;
    right: -12rem;
    top: 11rem;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.28), transparent 68%);
    filter: blur(14px);
    animation: floatGlow 8s var(--ease) infinite alternate;
    pointer-events: none;
}

body:has(.theme-toggle-input:checked) .hero::after {
    background: radial-gradient(circle, rgba(124, 58, 237, 0.14), transparent 68%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
    gap: clamp(3rem, 7vw, 6rem);
    align-items: center;
}

.eyebrow,
.section-eyebrow,
.project-category,
.timeline-date {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.project-category {
    display: inline-flex;
    width: fit-content;
    padding: 0.34rem 0.58rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--accent-soft);
    letter-spacing: 0.12em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), #a78bfa 48%, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    max-width: 680px;
    margin-top: 1.4rem;
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2.2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.78rem 1.25rem;
    border-radius: 999px;
    font-weight: 800;
    background-size: 160% 160%;
    transition: transform 220ms var(--ease), border-color 220ms ease, background 220ms ease, background-position 260ms ease, color 220ms ease, box-shadow 220ms ease;
}

.btn:hover {
    transform: translateY(-2px);
    background-position: 100% 50%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    color: white;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
    box-shadow: 0 22px 56px rgba(124, 58, 237, 0.38);
}

.btn-outline,
.btn-ghost {
    border: 1px solid var(--border);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
        rgba(255, 255, 255, 0.035);
}

.btn-outline:hover,
.btn-ghost:hover {
    border-color: var(--border-strong);
    color: var(--accent);
    background: var(--accent-soft);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    max-width: 720px;
    margin-top: 2.5rem;
}

.hero-stats div {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
        rgba(255, 255, 255, 0.035);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.14);
}

.hero-stats div::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.hero-stats strong,
.hero-stats span {
    display: block;
}

.hero-stats strong {
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
}

.hero-stats span {
    color: var(--muted);
    font-size: 0.86rem;
}

.hero-visual {
    position: relative;
    min-height: 520px;
    display: grid;
    place-items: center;
}

.hero-visual::before {
    content: '';
    position: absolute;
    width: min(90%, 440px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 62%),
        radial-gradient(circle at 72% 28%, rgba(124, 58, 237, 0.24), transparent 42%);
    filter: blur(12px);
    opacity: 0.9;
}

.profile-card {
    position: relative;
    z-index: 1;
    width: min(100%, 390px);
    aspect-ratio: 4 / 5;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 2rem;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.035)),
        var(--surface-elevated);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transform: rotate(-1.5deg);
    transition: transform 260ms var(--ease), box-shadow 260ms ease;
}

.profile-card:hover {
    transform: rotate(0deg) translateY(-4px);
    box-shadow: var(--shadow), 0 0 0 1px var(--ring), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.profile-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.55), transparent 38%, rgba(124, 58, 237, 0.55));
    opacity: 0.6;
}

.profile-card img {
    width: 100%;
    height: 100%;
    border-radius: 1.45rem;
    object-fit: cover;
    filter: saturate(1.03) contrast(1.05);
}

.section {
    position: relative;
    isolation: isolate;
    padding: clamp(4rem, 8vw, 7rem) 0;
}

.section::before {
    content: '';
    position: absolute;
    inset: 1rem max(1rem, calc((100vw - var(--container)) / 2)) 1rem;
    z-index: -1;
    border-radius: 2.5rem;
    background:
        radial-gradient(circle at 8% 0%, var(--surface-glow), transparent 24rem),
        linear-gradient(180deg, transparent, var(--section-wash), transparent);
    opacity: 0.72;
    pointer-events: none;
}

.section:nth-of-type(even)::before {
    background:
        radial-gradient(circle at 92% 12%, rgba(124, 58, 237, 0.08), transparent 26rem),
        linear-gradient(180deg, transparent, var(--section-wash), transparent);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: start;
}

.section-heading {
    margin-bottom: 2rem;
}

.section-heading h2 {
    text-wrap: balance;
}

.section-heading.center {
    text-align: center;
}

.section-heading.center h2 {
    margin-inline: auto;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}

.section-eyebrow::before {
    content: '';
    width: 1.8rem;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.glass-card,
.expertise-card,
.project-card,
.skill-group,
.timeline-content,
.credential-card,
.contact-panel {
    border: 1px solid var(--border);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.022) 44%, rgba(34, 211, 238, 0.035)),
        var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.glass-card,
.expertise-card,
.project-card,
.skill-group,
.timeline-content,
.credential-card,
.contact-panel {
    position: relative;
}

.glass-card::before,
.expertise-card::before,
.project-card::before,
.skill-group::before,
.timeline-content::before,
.credential-card::before,
.contact-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 34%, rgba(34, 211, 238, 0.05));
    opacity: 0.72;
}

.glass-card {
    display: grid;
    gap: 1rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--radius-xl);
}

.glass-card p {
    font-size: 1.04rem;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.expertise-card {
    position: relative;
    overflow: hidden;
    min-height: 245px;
    padding: 1.35rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: transform 220ms var(--ease), border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.expertise-card::after {
    content: '';
    position: absolute;
    inset: auto -20% -45% auto;
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.11);
    filter: blur(18px);
}

.expertise-card:hover,
.project-card:hover,
.skill-group:hover,
.credential-card:hover,
.contact-box:hover {
    transform: translateY(-5px);
    border-color: var(--border-strong);
    background: var(--surface-strong);
    box-shadow: var(--shadow), 0 0 0 1px var(--ring);
}

.expertise-number {
    color: var(--accent);
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
}

.expertise-card h3 {
    margin-top: 3rem;
    margin-bottom: 0.75rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.project-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    transition: transform 240ms var(--ease), border-color 240ms ease, background 240ms ease, box-shadow 240ms ease;
}

.project-img-wrapper {
    position: relative;
    height: 180px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.project-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 38%, rgba(3, 7, 18, 0.38)),
        radial-gradient(circle at 12% 12%, rgba(34, 211, 238, 0.16), transparent 42%);
    pointer-events: none;
}

body:has(.theme-toggle-input:checked) .project-img-wrapper::after {
    background:
        linear-gradient(180deg, transparent 42%, rgba(255, 255, 255, 0.34)),
        radial-gradient(circle at 12% 12%, rgba(8, 145, 178, 0.13), transparent 42%);
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms var(--ease), filter 500ms ease;
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.045);
    filter: saturate(1.12);
}

.project-content {
    display: flex;
    min-height: 390px;
    flex-direction: column;
    padding: 1.15rem;
}

.project-content h3 {
    font-size: 1.18rem;
}

.project-content p {
    font-size: 0.92rem;
}

.project-content h3 {
    margin: 0.35rem 0 0.65rem;
}

.project-highlights {
    display: grid;
    gap: 0.42rem;
    margin: 1.1rem 0;
    color: var(--muted);
    font-size: 0.86rem;
    list-style: none;
}

.project-highlights li {
    position: relative;
    padding-left: 1.1rem;
}

.project-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.68em;
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 50%;
    background: var(--accent);
}

.tags,
.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags {
    margin-top: auto;
}

.tag,
.skill-list span {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.tag {
    padding: 0.38rem 0.7rem;
    color: #c4f1ff;
}

body:has(.theme-toggle-input:checked) .tag {
    background: rgba(8, 145, 178, 0.08);
    color: #0e7490;
}

.view-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    margin-top: 1.25rem;
    color: var(--text);
    font-weight: 800;
}

.view-link:hover {
    color: var(--accent);
}

.skills-groups {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 1rem;
}

.skill-group {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    min-height: 190px;
    padding: 1.45rem;
    border-radius: var(--radius-lg);
    transition: transform 220ms var(--ease), border-color 220ms ease, background 220ms ease;
}

.skill-group-compact {
    gap: 0.8rem;
    min-height: auto;
    padding: 1rem;
}

.skill-group-compact .skill-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.8rem;
}

.skill-group-compact h3 {
    font-size: 1.02rem;
}

.skill-group-compact .skill-list span {
    padding: 0.35rem 0.62rem;
    font-size: 0.76rem;
}

.skill-group-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.skill-icon {
    display: grid;
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 0.95rem;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.16), transparent 42%),
        var(--accent-soft);
    color: var(--accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.skill-group h3 {
    font-size: 1.16rem;
    letter-spacing: -0.03em;
}

.skill-list span {
    padding: 0.45rem 0.72rem;
    line-height: 1.2;
    transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.skill-list span:hover {
    border-color: var(--border-strong);
    background: var(--accent-soft);
    color: var(--text);
    transform: translateY(-1px);
}

.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 0.45rem;
    width: 1px;
    background: linear-gradient(var(--accent), transparent);
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1rem 1fr;
    gap: 1rem;
}

.timeline-marker {
    width: 0.9rem;
    height: 0.9rem;
    margin-top: 1.4rem;
    border: 3px solid var(--bg);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.14);
}

.timeline-content {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
}

.timeline-content h3 {
    margin: 0.4rem 0 0.35rem;
}

.timeline-meta {
    margin-bottom: 0.9rem;
    color: #d7deea;
    font-weight: 700;
}

body:has(.theme-toggle-input:checked) .timeline-meta {
    color: #334155;
}

.credential-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.credential-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 132px;
    padding: 1.15rem;
    border-radius: var(--radius-lg);
    transition: transform 220ms var(--ease), border-color 220ms ease, background 220ms ease;
}

.credential-card img {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    object-fit: contain;
}

.credential-card h3 {
    margin-bottom: 0.35rem;
    font-size: 1.03rem;
    letter-spacing: -0.03em;
}

.credential-card p {
    font-size: 0.9rem;
}

.contact-section {
    padding-bottom: 5rem;
}

.contact-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    padding: clamp(1.5rem, 5vw, 3rem);
    border-radius: 2rem;
    background:
        radial-gradient(circle at 88% 12%, rgba(124, 58, 237, 0.14), transparent 18rem),
        linear-gradient(135deg, rgba(34, 211, 238, 0.13), transparent 45%),
        var(--surface);
}

body:has(.theme-toggle-input:checked) .contact-panel {
    background:
        radial-gradient(circle at 88% 12%, rgba(124, 58, 237, 0.1), transparent 18rem),
        linear-gradient(135deg, rgba(8, 145, 178, 0.09), transparent 45%),
        var(--surface);
}

.contact-panel h2 {
    margin-bottom: 1rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.contact-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 4.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025)),
        rgba(255, 255, 255, 0.04);
    font-weight: 800;
    transition: transform 220ms var(--ease), border-color 220ms ease, background 220ms ease, color 220ms ease;
}

.contact-box i {
    display: grid;
    width: 2.3rem;
    height: 2.3rem;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-content a {
    color: var(--muted);
    font-weight: 700;
}

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

.reveal {
    animation: fadeUp 720ms var(--ease) both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

@keyframes floatGlow {
    from {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.55;
    }

    to {
        transform: translate3d(-2rem, 2rem, 0) scale(1.08);
        opacity: 0.82;
    }
}

@media (max-width: 1040px) {
    .hero-content,
    .two-column,
    .contact-panel {
        grid-template-columns: 1fr;
    }

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

    .profile-card {
        max-width: 340px;
    }

    .expertise-grid,
    .skills-groups,
    .credential-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    html {
        scroll-padding-top: 88px;
    }

    .site-header {
        padding: 0;
    }

    .navbar {
        width: 100%;
        border-top: 0;
        border-inline: 0;
        border-radius: 0;
        background: rgba(3, 7, 18, 0.94);
    }

    body:has(.theme-toggle-input:checked) .navbar {
        background: rgba(255, 255, 255, 0.9);
    }

    .menu-toggle {
        display: grid;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.8rem);
        left: 1rem;
        right: 1rem;
        display: grid;
        gap: 0.25rem;
        padding: 0.75rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        background: rgba(3, 7, 18, 0.96);
        box-shadow: var(--shadow);
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 180ms ease, transform 180ms ease;
    }

    body:has(.theme-toggle-input:checked) .nav-links {
        background: rgba(255, 255, 255, 0.96);
    }

    .nav-links a {
        width: 100%;
        padding: 0.8rem 1rem;
    }

    .nav-toggle:checked ~ .nav-links {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .hero {
        min-height: auto;
        padding-top: 7.5rem;
    }

    .skills-groups {
        grid-template-columns: 1fr;
    }

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

    .project-content {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 1.25rem, var(--container));
    }

    .hero-actions,
    .hero-stats,
    .contact-grid,
    .expertise-grid,
    .credential-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .hero-stats {
        display: grid;
    }

    .btn {
        width: 100%;
    }

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

    .project-img-wrapper {
        height: 205px;
    }

    .credential-card {
        align-items: flex-start;
    }

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

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