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

:root {
    --sky: #8ecae6;
    --blue-green: #219ebc;
    --deep: #023047;
    --deep2: #021e2c;
    --deep3: #010f17;
    --amber: #ffb703;
    --orange: #fb8500;
    --white: #f8fbff;
    --text-light: #cde8f5;
    --text-muted: rgba(205, 232, 245, 0.5);
    --border: rgba(142, 202, 230, 0.12);
    --border-hover: rgba(255, 183, 3, 0.35);
    --radius: 10px;
    --transition: 0.3s ease;
    --max-w: 1100px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--deep);
    color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: none; }

header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(2, 48, 71, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    height: 64px;
}

header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--amber);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

nav ul {
    display: flex;
    gap: 2.2rem;
    align-items: center;
}

nav a {
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-light);
    transition: color var(--transition);
    position: relative;
    padding-bottom: 3px;
}
nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1.5px;
    background: var(--amber);
    transition: width var(--transition);
}
nav a:hover, nav a.active { color: var(--amber); }
nav a:hover::after, nav a.active::after { width: 100%; }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 300;
}
.menu-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: var(--transition);
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

section { padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 5vw, 4rem); }
.section-inner { max-width: var(--max-w); margin: 0 auto; }

section h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.4rem;
    display: inline-block;
}
section h2::after {
    content: '';
    display: block;
    width: 44px; height: 3px;
    background: var(--amber);
    border-radius: 2px;
    margin-top: 0.5rem;
    margin-bottom: 2.5rem;
}

#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding-top: calc(64px + 1rem);
    padding-bottom: 4rem;
    max-width: calc(var(--max-w) + 8rem);
    margin: 0 auto;
    padding-left: clamp(1.5rem, 5vw, 4rem);
    padding-right: clamp(1.5rem, 5vw, 4rem);
    background: none;
    position: relative;
}

/* Background orbs */
#home::before {
    content: '';
    position: fixed;
    top: -150px; right: -150px;
    width: 550px; height: 550px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(33,158,188,0.13) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
body::after {
    content: '';
    position: fixed;
    bottom: -100px; left: -100px;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,183,3,0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.home-content {
    flex: 1;
    min-width: 0;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.home-content .tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-green);
    border: 1px solid rgba(33,158,188,0.4);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.6rem;
}
.home-content .tag::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--blue-green);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

.home-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.6rem, 5.5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.12;
    color: var(--white);
    margin-bottom: 1.4rem;
}
.home-content h2 span { color: var(--amber); }
.home-content h2::after { display: none; }

.home-content p {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 500px;
    margin-bottom: 2.4rem;
    font-weight: 300;
    line-height: 1.85;
}

/* ── Home buttons row ── */
.home-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.home-btns button,
.home-btns .btn {
    flex: 1;
    justify-content: center;
    min-width: 160px;
}

.home-image {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.img-frame {
    width: clamp(240px, 30vw, 360px);
    height: clamp(240px, 30vw, 360px);
    border-radius: 50%;
    border: 2px solid var(--border);
    overflow: hidden;
    background: var(--deep2);
    position: relative;
}
.img-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 40px rgba(33,158,188,0.15);
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; }

button, .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--amber);
    color: var(--deep);
    border: none;
    padding: 0.85rem 2rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 5px;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition), color var(--transition), border-color var(--transition);
}
button:hover {
    background: var(--orange);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,183,3,0.25);
}
button:active { transform: translateY(0); }

.btn-outline {
    background: transparent;
    color: var(--amber);
    border: none;
}
.btn-outline:hover {
    background: rgba(255, 183, 3, 0.1);
    color: var(--amber);
    transform: translateY(-2px);
    box-shadow: none;
}

#about { background: var(--deep2); }
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 3rem;
    align-items: center;
}
.about-img-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 1;
    background: var(--deep);
}
.about-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

.about-text p {
    color: var(--text-light);
    font-weight: 300;
    font-size: 1rem;
    margin-bottom: 1.2rem;
    line-height: 1.85;
}
.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--amber);
    line-height: 1;
}
.stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

#skills { background: var(--deep); }
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.9rem;
}
.skills-grid li {
    background: rgba(142,202,230,0.04);
    border: 1px solid var(--border);
    border-left: 3px solid var(--blue-green);
    padding: 1rem 1.25rem;
    border-radius: 6px;
    transition: border-left-color var(--transition), background var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.skills-grid li:hover {
    border-left-color: var(--amber);
    background: rgba(255,183,3,0.05);
    transform: translateX(4px);
}
.skills-grid li strong {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sky);
    font-weight: 600;
}
.skills-grid li span {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 300;
    line-height: 1.5;
}

#projects { background: var(--deep2); }
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.4rem;
}
.project {
    background: rgba(142,202,230,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.project:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.project-img-link {
    display: block;
    position: relative;
    overflow: hidden;
    height: 170px;
}
.project-img-link img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.3s ease;
    background: rgba(33,158,188,0.08);
}
.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2,48,71,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}
.project-overlay span {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--amber);
    text-transform: uppercase;
}
.project-img-link:hover img { transform: scale(1.05); }
.project-img-link:hover .project-overlay { opacity: 1; }

.project-body {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    flex: 1;
}
.project-body h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--white);
}
.project-body p {
    font-size: 0.88rem;
    color: var(--text-light);
    font-weight: 300;
    line-height: 1.7;
}
.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.5rem;
}
.tags-row em {
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--deep);
    background: rgba(33,158,188,0.9);
    padding: 0.2rem 0.65rem;
    border-radius: 100px;
}

#contact { background: var(--deep); }

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.contact-left > p {
    color: var(--text-light);
    font-weight: 300;
    max-width: 440px;
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}
.contact-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(142,202,230,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
    cursor: pointer;
}
.contact-card:hover {
    border-color: var(--border-hover);
    background: rgba(255,183,3,0.05);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.contact-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(33,158,188,0.12);
    border: 1px solid rgba(33,158,188,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition), border-color var(--transition);
}
.contact-icon svg {
    width: 18px; height: 18px;
    color: var(--sky);
}
.contact-card:hover .contact-icon {
    background: rgba(255,183,3,0.12);
    border-color: rgba(255,183,3,0.3);
}
.contact-card:hover .contact-icon svg { color: var(--amber); }

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.contact-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}
.contact-value {
    font-size: 0.82rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-right {
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-img-wrap {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--deep2);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.contact-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

footer {
    background: var(--deep3);
    text-align: center;
    padding: 2rem 2rem;
    border-top: 1px solid var(--border);
}
footer p {
    color: var(--text-muted);
    font-size: 0.82rem;
}

@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-img-wrap { max-width: 340px; margin: 0 auto; }
    .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
    .contact-right { order: -1; }
    .contact-img-wrap { max-width: 360px; margin: 0 auto; }
}

@media (max-width: 768px) {
    header { height: 60px; }

    .menu-toggle { display: flex; }

    nav {
        position: fixed;
        top: 60px; left: 0; right: 0;
        background: rgba(2,48,71,0.97);
        backdrop-filter: blur(16px);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.3s ease;
        border-bottom: 1px solid var(--border);
    }
    nav.open {
        max-height: 360px;
        padding: 1.2rem 0;
    }
    nav ul {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }
    nav a {
        display: block;
        padding: 0.85rem 2rem;
        font-size: 0.88rem;
    }
    nav a::after { display: none; }

    #home {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
        padding-top: calc(60px + 2.5rem);
        gap: 2rem;
    }
    .home-content p { max-width: 100%; }
    .home-content .tag { margin-left: auto; margin-right: auto; }
    .home-image { margin: 0 auto; }
    .img-frame { width: 200px; height: 200px; }

    .about-stats { gap: 1.2rem; }

    .project-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }

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

@media (max-width: 480px) {
    .skills-grid { grid-template-columns: 1fr; }
    .about-stats { flex-wrap: wrap; gap: 1.2rem; }
}