:root {
    --bg-dark: #0f0f0f;
    --bg-card: #171717;
    --bg-elevated: #1f1f1f;
    --ink: #fafafa;
    --ink-muted: #a1a1a1;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(59, 130, 246, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    overflow-x: hidden;
}


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

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

.container {
    width: min(1300px, 90vw);
    margin: 0 auto;
}

.section {
    padding: 120px 0;
    scroll-margin-top: 80px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -50px;
    padding: 12px 20px;
    background: var(--accent);
    color: var(--bg-dark);
    border-radius: var(--radius-sm);
    font-weight: 600;
    z-index: 1000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
}

/* ==================== HEADER / HERO ==================== */
#header {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    overflow: hidden;
}

#header .container {
    position: relative;
    z-index: 1;
    padding: 24px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.brand-name {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(20px);
}

.nav-links a {
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--ink-muted);
    transition: all 0.25s ease;
}

.nav-links a:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.06);
}

.nav-links a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--ink);
    font-size: 1.2rem;
    cursor: pointer;
}

.nav-close {
    display: none;
    width: 100%;
    justify-content: flex-end;
}

.menu-close {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--ink);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Grid - Bento Style */
.hero-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 48px 0;
}

.header-text {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-muted);
    margin-bottom: 24px;
}

.header-text h1 {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.header-text h1 span {
    color: var(--accent);
}

.hero-sub {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--ink-muted);
    max-width: 640px;
    margin: 0 auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 36px 0 24px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.btn.primary {
    background: var(--accent);
    color: #fff;
}

.btn.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-subtle);
    color: var(--ink);
}

.btn.ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.btn.btn2 {
    background: var(--accent);
    color: #fff;
}

.btn.btn2:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.cta-note {
    font-size: 0.9rem;
    color: var(--ink-muted);
    margin-bottom: 24px;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
    justify-content: center;
}

.trust-chip {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    color: var(--ink-muted);
}

/* Hero Highlights - Bento Cards */
.hero-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.highlight {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.3s ease;
}

.highlight:hover {
    border-color: var(--border-accent);
}

.highlight h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ink);
}

.highlight p {
    font-size: 0.85rem;
    color: var(--ink-muted);
    line-height: 1.5;
}

/* Hero Panel - Side Cards */
.hero-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.3s ease;
}

.panel-card:hover {
    border-color: var(--border-accent);
}

.panel-card.accent {
    border-color: var(--border-accent);
}

.panel-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 12px;
}

.panel-card h3 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.panel-card p {
    color: var(--ink-muted);
    line-height: 1.6;
}

.plan-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 20px 0;
}

.plan-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink-muted);
    font-size: 0.95rem;
}

.plan-list li::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.panel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.panel-tags span {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-muted);
}

.panel-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-weight: 600;
    color: var(--accent);
    transition: gap 0.2s ease;
}

.panel-link:hover {
    gap: 12px;
}

.panel-link::after {
    content: "\2192";
}

/* Welcome Message */
.welcome-message {
    max-width: 450px;
    margin: 24px auto;
    padding: 14px 24px;
    border-radius: 999px;
    text-align: center;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid var(--border-accent);
    color: var(--accent);
    font-weight: 600;
}

/* ==================== ABOUT SECTION ==================== */
#about {
    position: relative;
    background: var(--bg-dark);
}

.about-shell {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 48px;
    transition: all 0.3s ease;
}

.about-shell:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    flex-wrap: wrap;
}


.about-content {
    max-width: 700px;
    margin: 0 auto;
}

.about-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.about-badges span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--ink-muted);
    font-weight: 500;
    font-size: 0.85rem;
}

.about-card {
    display: grid;
    gap: 16px;
}

.sub-title {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.section-lead {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--ink-muted);
    max-width: 600px;
}

#about p {
    color: var(--ink-muted);
    line-height: 1.7;
}

/* Tabs */
.tab-title {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 20px;
}

.tab-links {
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--ink-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.tab-links:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
}

.tab-links.active-link {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
}

.tab-contents {
    display: none;
}

.tab-contents.active-tab {
    display: block;
}

.tab-contents ul {
    list-style: none;
    display: grid;
    gap: 12px;
}

#skills ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#skills ul li {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    font-size: 0.9rem;
}

#skills ul li span {
    color: var(--ink);
    font-weight: 500;
}

.tab-contents ul li span {
    color: var(--ink);
    font-weight: 600;
}

.tab-contents ul li {
    color: var(--ink-muted);
}

#experience ul,
#education ul {
    display: grid;
    gap: 16px;
}

#experience ul li,
#education ul li {
    padding: 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    line-height: 1.6;
}

#experience ul li:hover,
#education ul li:hover {
    border-color: var(--border-accent);
}

/* ==================== SERVICES SECTION ==================== */
#services {
    position: relative;
    background: var(--bg-dark);
}

#services .container,
#portfolio .container,
#contact .container {
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.services-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.services-list > div {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.services-list > div:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
}

.services-list > div i {
    font-size: 2.5rem;
    margin-bottom: 24px;
    color: var(--accent);
}

.services-list > div h2 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 14px;
    position: relative;
}

.services-list > div p {
    color: var(--ink-muted);
    line-height: 1.7;
    position: relative;
}

/* ==================== PORTFOLIO SECTION ==================== */
#portfolio {
    position: relative;
    background: var(--bg-dark);
}

.work-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.work {
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    aspect-ratio: 16 / 10;
    transition: all 0.4s ease;
}

.work:hover {
    border-color: var(--border-accent);
}

.work img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.4s ease;
}

.work:hover img {
    transform: scale(1.08);
    opacity: 0.3;
}

.layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 15, 0.95) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.work:hover .layer {
    opacity: 1;
}

.layer h3 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.layer p {
    color: var(--ink-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.layer ul {
    margin: 12px 0;
    padding-left: 0;
    list-style: none;
}

.layer ul li {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
}

.layer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    width: fit-content;
    transition: background 0.2s ease;
}

.layer a:hover {
    background: var(--accent-hover);
}

.portfolio-cta {
    margin-top: 40px;
}

/* ==================== CONTACT SECTION ==================== */
#contact {
    position: relative;
    background: var(--bg-dark);
    padding-bottom: 60px;
}

#contact .row {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 48px;
    gap: 48px;
}

.contact-left {
    flex-basis: 40%;
}

.contact-rigth {
    flex-basis: 55%;
}

.contact-left p {
    margin-top: 20px;
    color: var(--ink-muted);
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-left p i {
    color: var(--accent);
    font-size: 1.2rem;
    width: 24px;
}

.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.social-icons a {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--ink-muted);
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent);
    border-color: var(--border-accent);
    background: rgba(0, 212, 255, 0.08);
    transform: translateY(-4px);
}

.contact-left .btn {
    margin-top: 28px;
}

.contact-rigth form {
    display: grid;
    gap: 16px;
}

form input,
form textarea {
    width: 100%;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
    color: var(--ink);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.25s ease;
}

form input::placeholder,
form textarea::placeholder {
    color: var(--ink-muted);
}

form input:focus,
form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.03);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

form textarea {
    resize: vertical;
    min-height: 140px;
}

form .btn2 {
    padding: 16px 32px;
    width: fit-content;
    border: none;
}

#msg {
    color: var(--accent);
    font-weight: 600;
}

/* Footer */
.copyrigth {
    text-align: center;
    padding: 32px 0;
    color: var(--ink-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 60px;
}

.copyrigth i {
    color: var(--coral);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(12px);
    overflow: auto;
    padding: 60px 20px;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 440px;
    margin: 0 auto;
    position: relative;
}

.modal-content h1 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.75rem;
    margin-bottom: 24px;
}

.close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: var(--ink-muted);
    font-size: 1.75rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: var(--ink);
}

/* Admin Options */
#adminOptions {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100;
}

/* ==================== REVEAL ANIMATIONS ==================== */
body.has-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

body.has-reveal [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

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

    body.has-reveal [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

/* ==================== RESPONSIVE ==================== */
@media only screen and (max-width: 1024px) {
    .hero-grid {
        gap: 32px;
    }

    .hero-panel {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-highlights {
        grid-template-columns: repeat(3, 1fr);
    }

    .services-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .work-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (max-width: 768px) {
    .section {
        padding: 80px 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -280px;
        width: 260px;
        height: 100vh;
        background: var(--bg-card);
        border-left: 1px solid var(--border-subtle);
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
        border-radius: 0;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 200;
    }

    .nav-links a {
        width: 100%;
        padding: 12px 16px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-close {
        display: flex;
        margin-bottom: 16px;
    }

    .hero-panel {
        grid-template-columns: 1fr;
        gap: 12px;
    }

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

    .header-text h1 {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
    }

    .row {
        flex-direction: column;
        gap: 32px;
    }

    .about-shell {
        padding: 28px;
    }


    #skills ul {
        columns: 1;
    }

    .services-list {
        grid-template-columns: 1fr;
    }

    .work-list {
        grid-template-columns: 1fr;
    }

    #contact .row {
        padding: 28px;
    }

    .contact-left,
    .contact-rigth {
        flex-basis: 100%;
    }
}

@media only screen and (max-width: 480px) {
    .container {
        width: 92vw;
    }

    .section {
        padding: 60px 0;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .trust-row {
        flex-direction: column;
    }

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

    .panel-card {
        padding: 20px;
    }

    .sub-title {
        font-size: 2rem;
    }

    .about-shell {
        padding: 20px;
    }

    .services-list > div {
        padding: 24px;
    }

    #contact .row {
        padding: 20px;
    }
}

/* ==================== LARGE SCREENS =================== */
@media only screen and (min-width: 1400px) {
    .container {
        width: min(1440px, 88vw);
    }

    .hero-grid {
        gap: 56px;
    }

    .header-text h1 {
        font-size: 4.5rem;
    }

    .hero-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .services-list > div {
        padding: 44px;
    }

    .work {
        aspect-ratio: 16 / 9;
    }
}
