/* --- Minimalist Black & White Theme (Swiss Style) --- */
:root {
    --bg-light: #fafafa;
    --bg-white: #ffffff;
    --text-primary-light: #111111;
    --text-muted-light: #777777;
    --border-light: #e5e5e5;

    --bg-dark: #0a0a0a;
    --bg-darker: #000000;
    --text-primary-dark: #f0f0f0;
    --text-muted-dark: #888888;
    --border-dark: #222222;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-speed: 0.3s;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Base Light Mode Classes */
body.light-mode {
    background-color: var(--bg-light);
    color: var(--text-primary-light);
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition-speed);
}

a:hover {
    opacity: 0.7;
}

/* --- Grid / ASCII Background --- */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-image:
        linear-gradient(var(--border-light) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.15;
    /* Reduced opacity to allow mesh to show through */
    animation: panGrid 45s linear infinite;
}

/* --- Mesh Gradient Glassmorphism Background --- */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: #ffffff;
    /* Crisp white base */
    overflow: hidden;
}

/* Glassmorphism Frosted Texture Overlay */
.mesh-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    z-index: 0;
    pointer-events: none;
}

.mesh-blob {
    position: absolute;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.85;
    animation: floatBlob 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

/* Dark silver swooping gradient */
.mesh-blob.blob-1 {
    top: -20%;
    left: -10%;
    width: 70vw;
    height: 60vw;
    background: radial-gradient(ellipse, #eaedf2 0%, transparent 70%);
}

/* Medium soft silver bottom right */
.mesh-blob.blob-2 {
    bottom: -30%;
    right: -10%;
    width: 80vw;
    height: 70vw;
    background: radial-gradient(ellipse, #e2e5e9 0%, transparent 70%);
    animation-delay: -5s;
    animation-duration: 25s;
}

/* Piercing bright white center */
.mesh-blob.blob-3 {
    top: 20%;
    left: 30%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #ffffff 0%, transparent 70%);
    animation-delay: -10s;
    animation-duration: 15s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(5vw, 5vh) scale(1.1);
    }

    66% {
        transform: translate(-5vw, 10vh) scale(0.9);
    }

    100% {
        transform: translate(10vw, -5vh) scale(1);
    }
}

@keyframes panGrid {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 50px 50px;
    }
}

.bg-mark {
    position: absolute;
    color: #cccccc;
    font-size: 10px;
    font-family: monospace;
    opacity: 0.5;
}

/* --- Animated Lines --- */
.animated-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.floating-line {
    position: absolute;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4), transparent);
    bottom: -20vh;
    opacity: 0;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(10vh);
        opacity: 0;
    }

    20% {
        opacity: 0.3;
    }

    80% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-120vh);
        opacity: 0;
    }
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    letter-spacing: -0.03em;
    font-weight: 500;
}

.text-muted {
    color: var(--text-muted-light);
}

.overline {
    font-family: monospace;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--text-muted-light);
    margin-bottom: 1.5rem;
}

.caption {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted-light);
}

/* --- Layout & Sections --- */
main {
    width: 100%;
}

.section {
    padding: 8rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
    scroll-margin-top: 100px;
}

#contact.section {
    padding-bottom: 6rem;
}

.section.full-width-section {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.pt-0 {
    padding-top: 2rem !important;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 4rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

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

.justify-center {
    justify-content: center;
}

/* --- Forms & Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.small-btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.primary-btn {
    background-color: var(--text-primary-light);
    color: var(--bg-white);
    border: 1px solid var(--text-primary-light);
}

.primary-btn:hover {
    background-color: var(--text-muted-light);
    border-color: var(--text-muted-light);
    color: var(--bg-white);
    opacity: 1;
}

.secondary-btn {
    background-color: var(--bg-white);
    color: var(--text-primary-light);
    border: 1px solid var(--border-light);
}

.secondary-btn:hover {
    border-color: var(--text-primary-light);
}

/* --- Navigation (Floating Pill) --- */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1100px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 100px;
    padding: 0.6rem 1.2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

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

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.03em;
    min-width: 120px;
    /* Fixed width to help centering the links */
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    font-size: 0.85rem;
    color: var(--text-muted-light);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 120px;
    /* Balance with logo width */
}

/* --- Hamburger Button --- */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary-light);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger animation when open */
.nav-open .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

.nav-open .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Mobile Nav Dropdown --- */
.mobile-nav-links {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.nav-open .mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.2rem 0 0.8rem;
    border-top: 1px solid var(--border-light);
    margin-top: 0.8rem;
    width: 100%;
}

.mobile-nav-links a {
    font-size: 0.9rem;
    color: var(--text-muted-light);
    font-weight: 400;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
}

.mobile-nav-links a:hover {
    color: var(--text-primary-light);
}

/* --- Hero Section --- */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
    width: 100%;
}

.hero-overline {
    width: 100%;
    margin-bottom: -2rem;
}

.hero-text {
    flex: 1.2;
}

.hero-title {
    font-size: 5rem;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted-light);
    max-width: 500px;
    margin-bottom: 2rem;
    text-align: justify;
}

.hero-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-muted-light);
    padding: 0.5rem 0;
    transition: color var(--transition-speed);
}

.detail-item i {
    width: 20px;
    text-align: center;
    color: var(--text-primary-light);
    font-size: 1.1rem;
    opacity: 0.7;
}

.detail-item:hover,
.detail-item:hover a {
    color: var(--text-primary-light);
}

.detail-item a {
    color: var(--text-muted-light);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.profile-img-container {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05), inset 0 0 20px rgba(255, 255, 255, 0.5);
    padding: 10px;
    /* Leave space between glass rim and image inside */
}

/* Image needs internal curve to match border padding */
.profile-img-container .profile-img {
    border-radius: 50%;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Force black and white */
    transition: filter 0.5s ease, transform 0.5s ease;
}

.profile-img:hover {
    filter: grayscale(0%);
}

/* --- Capabilities Section --- */
.section-title {
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.centered-header .section-title {
    margin-bottom: 1rem;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 4rem;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    transition: transform 0.4s ease, background 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.6);
}

.feature-number {
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-muted-light);
    width: 30px;
}

.feature-content {
    flex: 1;
}

.feature-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.split-columns {
    display: flex;
    gap: 3rem;
    margin-top: 1.5rem;
}

.split-columns>div {
    flex: 1;
}

/* Organized Skills Grid & Spotlight Hover */
.skills-grid-minimal {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .split-columns {
        flex-direction: column;
        gap: 1.5rem;
    }
}

.skill-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.group-label {
    font-family: monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted-light);
    opacity: 0.7;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    font-size: 0.95rem;
    color: var(--text-primary-light);
    background: transparent;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: default;
}

/* Spotlight Effect: Dim others when a group is hovered */
.skills-grid-minimal:hover .skill-group {
    opacity: 0.3;
}

.skills-grid-minimal:hover .skill-group:hover {
    opacity: 1;
    transform: translateX(5px);
}

/* Micro-interaction on tag hover */
.skill-tag:hover {
    color: #000;
    transform: scale(1.05);
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.skill-tag::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #000;
    transition: width 0.3s ease;
}

.skill-tag:hover::after {
    width: 100%;
}

.feature-visual {
    flex: 1;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-white);
    padding: 2rem;
}

/* Abstract visuals replicating screenshots */
.abstract-code {
    width: 100%;
    max-width: 250px;
}

.abstract-code .line {
    height: 8px;
    background-color: var(--border-light);
    margin-bottom: 8px;
    border-radius: 2px;
}

.abstract-code .line:nth-child(even) {
    background-color: var(--text-muted-light);
}

.w-40 {
    width: 40%;
}

.w-60 {
    width: 60%;
}

.w-70 {
    width: 70%;
}

.w-80 {
    width: 80%;
}

.w-90 {
    width: 90%;
}

/* Personal Info Elements */
.info-elements-minimal {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.info-item-minimal {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    transition: transform 0.3s ease;
    cursor: default;
}

.info-item-minimal:hover {
    transform: translateX(8px);
}

.info-item-minimal:hover .info-label {
    color: #000;
    opacity: 1;
}

.info-item-minimal:hover .info-value {
    color: #000;
}

/* Dark Section Elements Enhancement */
.dark-version .info-label {
    color: var(--text-muted-dark);
}

.dark-version .info-value {
    color: var(--text-primary-dark);
}

.dark-version .info-item-minimal:hover .info-label,
.dark-version .info-item-minimal:hover .info-value {
    color: #fff;
}

.info-label {
    font-family: monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted-light);
    opacity: 0.7;
}

.info-value {
    font-size: 1.1rem;
    color: var(--text-primary-light);
    font-weight: 500;
}

/* Abstract Profile Visual */
.abstract-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.p-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
}

.p-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.p-line {
    height: 6px;
    background: var(--border-light);
    border-radius: 2px;
}

/* Unique hover for Soft Skills tags (Border Reveal) */
#skills .feature-card:last-child .skill-tag {
    padding-left: 0;
    transition: all 0.3s ease;
}

#skills .feature-card:last-child .skill-tag:hover {
    padding-left: 12px;
    color: #000;
    transform: none;
    /* Override the default scale from skill-tag */
}

#skills .feature-card:last-child .skill-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 0;
    background: #000;
    transition: height 0.3s ease;
}

#skills .feature-card:last-child .skill-tag:hover::before {
    height: 100%;
}

#skills .feature-card:last-child .skill-tag:hover::after {
    width: 0;
    /* Override the underline from default skill-tag */
}

.circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
}

.circle.c2 {
    border-color: var(--text-muted-light);
    background: var(--border-light);
}

.circle.c3 {
    background: var(--text-primary-light);
    border-color: var(--text-primary-light);
}

/* --- Dark Section (Process/Projects) --- */
.dark-section {
    background-color: var(--bg-dark);
    color: var(--text-primary-dark);
}

.dark-section .text-muted {
    color: var(--text-muted-dark);
}

.dark-section .overline {
    color: var(--text-muted-dark);
}

.dark-section .section-title {
    color: var(--text-primary-dark);
}

.dark-section .detail-item i {
    color: var(--text-primary-dark);
}

.projects-layout {
    display: flex;
    gap: 4rem;
}

.projects-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 1rem 1rem 1rem;
    border-bottom: 1px solid var(--border-dark);
    position: relative;
    z-index: 5;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
}

.project-item:last-child {
    border-bottom: none;
}

.project-num {
    font-family: monospace;
    color: var(--text-muted-dark);
    font-size: 1rem;
    width: 30px;
    transition: color 0.3s ease;
}

.project-details h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary-dark);
    transition: color 0.3s ease;
}

/* --- Project Gallery Styling --- */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 1.25rem;
}

.project-gallery a {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-dark);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-gallery a:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
    /* Reset default link hover opacity */
}

.project-gallery img {
    width: 100%;
    height: 100px;
    /* Fixed height for uniformity */
    object-fit: cover;
    object-position: top;
    /* Preferred for dashboard screenshots */
    display: block;
    transition: transform 0.5s ease;
}

.project-gallery a:hover img {
    transform: scale(1.1);
}

.project-details .project-tech {
    color: var(--text-muted-dark);
    font-size: 0.95rem;
    transition: color 0.3s ease;
    margin-bottom: 0;
}

.project-details .project-desc-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.project-details .project-desc {
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.7;
    min-height: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    text-align: justify;
}

/* Hover-only styles (desktop with mouse) */
@media (hover: hover) {
    .project-item:hover {
        background-color: rgba(255, 255, 255, 0.05) !important;
        border-left-color: #ffffff !important;
        border-bottom-color: rgba(255, 255, 255, 0.2) !important;
        transform: translateX(10px);
        padding-bottom: 1.5rem !important;
    }

    .project-item:hover .project-desc-wrapper {
        grid-template-rows: 1fr;
        margin-top: 0.8rem;
    }

    .project-item:hover .project-desc {
        opacity: 1;
    }

    .project-item:hover .project-num,
    .project-item:hover h3 {
        color: #ffffff !important;
    }
}

/* Touch/click toggle styles (works on all devices) */
.project-item.project-expanded {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-left-color: #ffffff !important;
    border-bottom-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateX(10px);
    padding-bottom: 1.5rem !important;
}

.project-item.project-expanded .project-desc-wrapper {
    grid-template-rows: 1fr;
    margin-top: 0.8rem;
}

.project-item.project-expanded .project-desc {
    opacity: 1;
}

.project-item.project-expanded .project-num,
.project-item.project-expanded h3 {
    color: #ffffff !important;
}

/* VS Code style mockup */
.project-visual-mockup {
    flex: 1;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    overflow: hidden;
    align-self: flex-start;
    position: sticky;
    top: 100px;
}

.mockup-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mockup-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--border-dark);
}

.mockup-header .mockup-title {
    margin-left: auto;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted-dark);
}

.mockup-body {
    padding: 1.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e0e0e0;
}

.mockup-body pre {
    overflow-x: auto;
}

.line-num {
    color: var(--text-muted-dark);
    padding-right: 15px;
    user-select: none;
}

.keyword {
    color: #d7ba7d;
}

.method {
    color: #dcdcaa;
}

.string {
    color: #ce9178;
}

.key {
    color: #9cdcfe;
}

.comment {
    color: #6a9955;
}

/* --- Experience & Education --- */
.experience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.subsection-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.timeline-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
    cursor: default;
    transition: transform 0.3s ease;
}

/* Hover-only styles (desktop with mouse) */
@media (hover: hover) {
    .timeline-row:hover {
        transform: translateX(5px);
    }

    .timeline-row:hover .timeline-desc-wrapper {
        grid-template-rows: 1fr;
        margin-top: 0.5rem;
    }

    .timeline-row:hover .timeline-desc {
        opacity: 1;
    }
}

/* Touch/click toggle styles */
.timeline-row.timeline-expanded {
    transform: translateX(5px);
}

.timeline-info .timeline-short {
    font-size: 0.95rem;
    color: var(--text-muted-light);
    margin-bottom: 0;
}

.timeline-desc-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease;
    overflow: hidden;
}

.timeline-desc {
    color: var(--text-muted-light);
    font-size: 0.9rem;
    line-height: 1.6;
    min-height: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: justify;
}

.timeline-row.timeline-expanded .timeline-desc-wrapper {
    grid-template-rows: 1fr;
    margin-top: 0.5rem;
}

.timeline-row.timeline-expanded .timeline-desc {
    opacity: 1;
}

.timeline-date {
    width: 120px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted-light);
    flex-shrink: 0;
    margin-top: 3px;
}

.timeline-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--text-primary-light);
}

.timeline-info p {
    font-size: 0.95rem;
    color: var(--text-muted-light);
}

/* --- Contact Layout Visuals --- */
.contact-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Vertically center the columns relative to each other */
    gap: 2rem;
    width: 100%;
}

.contact-content-col {
    flex: 1;
}

.contact-visual-col {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    user-select: none;
}

.minimal-art-wrapper {
    position: relative;
    width: 450px;
    height: 450px;
    perspective: 1200px;
}

/* --- Unique Minimal Visual: Celestial Sphere --- */
.celestial-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 450px;
    height: 450px;
    margin-top: -400px;
    margin-left: -100px;
    transform-style: preserve-3d;
    animation: slowRotate 35s infinite linear;
}

.celestial-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 50%;
}

.c-ring-1 {
    transform: rotateX(70deg) rotateY(15deg);
}

.c-ring-2 {
    transform: rotateX(120deg) rotateY(45deg);
}

.c-ring-3 {
    transform: rotateX(25deg) rotateY(70deg);
}

.celestial-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

@keyframes slowRotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

/* --- Tap Hint (Mobile Touch Indicator) --- */
.tap-hint {
    display: none;
    font-size: 1.5rem;
    color: var(--text-muted-dark);
    opacity: 0.4;
    position: absolute;
    top: 0.1rem;
    right: 0.5rem;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    line-height: 1;
}

.tap-hint.light {
    color: var(--text-muted-light);
}

.project-expanded .tap-hint,
.timeline-expanded .tap-hint {
    transform: rotate(180deg);
    opacity: 0.7;
}

@media (hover: none) and (pointer: coarse) {
    .tap-hint {
        display: block;
    }
}

/* --- Footer --- */
.minimal-footer {
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
    margin-top: 0;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-weight: 600;
}

.footer-logo span {
    font-size: 0.5rem;
    vertical-align: super;
    color: var(--text-muted-light);
}

.minimal-footer p {
    color: var(--text-muted-light);
    font-size: 0.85rem;
    margin: 0;
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(5px);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity, filter;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* --- Responsive --- */

/* Tablet + Small Desktop (max-width: 900px) */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero-image-wrapper {
        order: 2;
    }

    .hero-text {
        order: 3;
    }

    .hero-overline {
        order: 1;
        text-align: left;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .navbar.nav-open {
        border-radius: 20px;
    }

    .feature-card {
        flex-direction: column;
    }

    .feature-number {
        margin-bottom: 0.5rem;
    }

    .feature-visual {
        width: 100%;
    }

    .projects-layout {
        flex-direction: column;
    }

    .project-visual-mockup {
        position: static;
    }

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

    .timeline-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .contact-layout {
        flex-direction: column;
        align-items: center;
    }

    .contact-actions {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .contact-actions .hero-actions {
        align-items: center;
    }

    .contact-visual-col {
        display: none;
    }

    .profile-img-container {
        width: 280px;
        height: 280px;
    }

    .section {
        padding: 5rem 1.5rem;
    }

    .footer-content {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
        text-align: center;
    }
}

/* Mobile (max-width: 600px) */
@media (max-width: 600px) {
    .hero {
        padding-top: 25vh;
        /* Use vh for dynamic spacing */
    }

    .hero-image-wrapper {
        margin-top: 1rem;
    }

    .project-visual-mockup {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mockup-body {
        font-size: 0.62rem;
        padding: 0.8rem;
        overflow-x: auto;
    }

    .mockup-body pre {
        white-space: pre;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .hero-title {
        font-size: 1.8rem;
        /* even smaller for better mobile fit */
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section {
        padding: 10vh 1.2rem 4rem 1.2rem;
    }

    .section-inner {
        padding: 0rem 1rem;
    }

    .profile-img-container {
        width: 180px;
        /* smaller for better balance */
        height: 180px;
    }

    .feature-content h3 {
        font-size: 1.3rem;
    }

    .project-details h3 {
        font-size: 1.2rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }

    .navbar {
        width: 94%;
        top: 10px;
        padding: 0.5rem 1rem;
    }

    .navbar .btn.small-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.8rem;
    }
}

/* --- Project Preview Modal Tweaks --- */
#projectModal .modal-dialog {
    max-width: 90% !important;
    /* Forces the modal to not reach the end of the screen on any device */
    margin-left: auto;
    margin-right: auto;
    margin-top: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 992px) {
    #projectModal .modal-dialog {
        max-width: 85% !important;
    }
}

@media (min-width: 1400px) {
    #projectModal .modal-dialog {
        max-width: 1140px !important;
        /* Cap it for very large screens to maintain clarity */
    }
}

#projectModal .modal-content {
    background-color: #0d0d0d !important;
    border: 1px solid #222 !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
}

#projectModal .modal-header {
    background-color: #0d0d0d;
    border-bottom: 1px solid #1a1a1a;
    padding: 1.2rem 1.5rem;
}

#projectModal .modal-title {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

#projectModal .modal-body {
    padding: 0;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#projectModal #modalImage {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 85vh;
    /* Prevents image from being too tall for the viewport */
    object-fit: contain;
}

#projectModal .btn-close-white {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

#projectModal .modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0.8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

#projectModal .modal-nav-btn i {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#projectModal .modal-nav-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

#projectModal .prev-btn {
    left: 20px;
}

#projectModal .next-btn {
    right: 20px;
}

#projectModal #modalImage {
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    #projectModal .modal-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 0.8rem;
    }

    #projectModal .prev-btn {
        left: 10px;
    }

    #projectModal .next-btn {
        right: 10px;
    }
}

/* --- Dedicated Work Experience Section (Swiss Style with Premium Consistent Cards) --- */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 900px;
    margin: 3rem auto 0 auto;
}

.experience-card {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    position: relative;
    transition: transform 0.4s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.experience-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.6);
    border-color: var(--text-primary-light, #111111);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.06);
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 24px;
    bottom: 24px;
    left: 0;
    width: 4px;
    background: var(--text-primary-light, #111111);
    border-radius: 0 4px 4px 0;
    opacity: 0.15;
    transition: all 0.3s ease;
}

.experience-card:hover::before {
    opacity: 1;
    background: var(--text-primary-light, #111111);
}

.experience-number {
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-muted-light, #777777);
    width: 30px;
    transition: color 0.3s ease;
}

.experience-card:hover .experience-number {
    color: var(--text-primary-light, #111111);
    font-weight: bold;
}

.experience-content {
    flex: 1;
}

.experience-header-block {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.experience-title-area h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-primary-light, #111111);
    letter-spacing: -0.02em;
}

.experience-company {
    font-size: 1.05rem;
    color: var(--text-muted-light, #777777);
    font-weight: 500;
}

.experience-meta {
    text-align: right;
}

.experience-date-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: #111111;
    color: #ffffff;
    border-radius: 100px;
    font-size: 0.8rem;
    font-family: monospace;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.experience-location {
    font-size: 0.8rem;
    color: var(--text-muted-light, #777777);
    font-family: monospace;
}

.experience-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.experience-body li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary-light, #111111);
    text-align: justify;
}

.experience-body li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--text-muted-light, #777777);
    font-weight: bold;
    font-size: 0.95rem;
}

.experience-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    border-top: 1px dashed var(--border-light, #e5e5e5);
    padding-top: 1.2rem;
}

.experience-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-light, #e5e5e5);
    border-radius: 100px;
    color: var(--text-primary-light, #111111);
    font-family: monospace;
    transition: all 0.2s ease;
}

.experience-card:hover .experience-badge {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}

@media (max-width: 768px) {
    .experience-card {
        flex-direction: column;
        gap: 1rem;
        padding: 1.75rem;
    }

    .experience-header-block {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .experience-meta {
        text-align: left;
    }
}

/* --- Experience & Timeline Gallery --- */
.experience-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.25rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 12px;
    width: fit-content;
    max-width: 100%;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.02), 
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.experience-gallery a {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    width: 160px;
    height: 110px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.experience-gallery a:hover {
    transform: translateY(-4px) scale(1.03);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    opacity: 1 !important;
}

.experience-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.experience-gallery a:hover img {
    transform: scale(1.06);
}