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

html {
    scroll-behavior: smooth;
}

/* ====== VARIABLES ====== */
:root {
    --background: #f6f8fb;
    --surface: #ffffff;
    --surface-muted: #eef4f7;
    --text: #17212f;
    --heading: #0f172a;
    --muted: #5f6f84;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --accent: #2563eb;
    --border: #dbe4ee;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
    --radius: 8px;
    --transition: 180ms ease;
}

/* ====== GLOBAL ====== */
body {
    min-height: 100vh;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 32rem),
        linear-gradient(180deg, #ffffff 0%, var(--background) 34rem);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
}

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

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
}

.container {
    width: min(92%, 1120px);
    margin: 0 auto;
}

h1,
h2,
h3 {
    color: var(--heading);
    line-height: 1.15;
    letter-spacing: 0;
}

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

/* ====== NAVBAR ====== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(219, 228, 238, 0.9);
    backdrop-filter: blur(16px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 0.9rem 0;
}

.navbar h1 {
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-weight: 700;
}

.navbar h2,
.navbar h3 {
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links {
    color: var(--primary);
    font-weight: 700;
}

.nav-links a,
a.nav-links {
    color: var(--primary);
    font-weight: 700;
    transition: color var(--transition);
}

.nav-links a {
    margin-left: 1.25rem;
}

.nav-links a:hover,
a.nav-links:hover {
    color: var(--accent);
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-icons a {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.nav-icons a:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: var(--shadow-soft);
}

.nav-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.nav-menu {
    position: relative;
}

.menu-btn {
    min-height: 2.25rem;
    padding: 0 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--heading);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.menu-btn:hover {
    color: var(--primary);
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: var(--shadow-soft);
}

.dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    display: none;
    min-width: 165px;
    padding: 0.45rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.dropdown a {
    display: block;
    padding: 0.65rem 0.75rem;
    border-radius: 6px;
    color: var(--text);
    font-weight: 700;
    transition: background var(--transition), color var(--transition);
}

.dropdown a:hover {
    background: var(--surface-muted);
    color: var(--primary);
}

.nav-menu:hover .dropdown,
.nav-menu:focus-within .dropdown {
    display: block;
}

/* ====== HERO SECTION ====== */
.hero {
    padding: clamp(3rem, 7vw, 5.5rem) 0 3rem;
}

.home-grid {
    display: grid;
    grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.18fr);
    gap: 1.5rem;
    align-items: stretch;
}

.hero .card {
    min-height: 100%;
}

.hero h2 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3.25rem);
}

.hero p {
    max-width: 66ch;
    font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.hero .btn,
.resume .btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.15rem;
    border-radius: var(--radius);
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.hero .btn:hover,
.resume .btn:hover {
    transform: translateY(-2px);
    background: var(--primary-dark);
    box-shadow: var(--shadow-soft);
}

.limited-img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 2px);
}

/* ====== SECTIONS ====== */
.section {
    padding: 3.5rem 0;
}

.section h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
}

/* ====== PROJECTS ====== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.card {
    background: rgba(255, 255, 255, 0.92);
    padding: clamp(1.25rem, 2.4vw, 1.75rem);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 118, 110, 0.32);
    box-shadow: var(--shadow);
}

.card h3 {
    margin-bottom: 0.6rem;
    font-size: 1.18rem;
}

.card p {
    font-size: 0.98rem;
}

/* ====== SKILLS ====== */
.skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
}

.skill {
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 999px;
    background: #e7f3f1;
    color: var(--primary-dark);
    font-size: 0.92rem;
    font-weight: 700;
}

.project-links {
    display: grid;
    gap: 0.5rem;
    text-align: center;
}

/* ====== PROJECT GALLERY ====== */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.project-gallery img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    background: #ffffff;
    transition: transform var(--transition), box-shadow var(--transition);
}

.project-gallery img:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.project-content {
    max-width: 900px;
    margin: 0 auto;
}

.project-content h2 {
    margin-bottom: 1rem;
}

.project-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.65rem;
    font-size: 1.18rem;
}

.project-content p {
    margin-bottom: 1rem;
}

/* ====== RESUME SECTION ====== */
.resume {
    text-align: center;
}

iframe {
    display: block;
    margin-top: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    background: var(--surface);
}

/* ===== VIDEO SECTION ===== */
.video-section {
    margin-top: 1.25rem;
    text-align: center;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    padding-bottom: 56.25%;
    border-radius: var(--radius);
    background: #0f172a;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-section h3 {
    margin-bottom: 0.6rem;
}

/* ===== FOOTER ===== */
.footer {
    margin-top: 3rem;
    padding: 2rem 0;
    background: #10231f;
    color: rgba(255, 255, 255, 0.86);
    text-align: center;
}

.footer p,
.footer a {
    color: rgba(255, 255, 255, 0.82);
}

.footer-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.footer-contact {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.contact-item img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
    opacity: 0.82;
}

.footer-copy {
    font-size: 0.85rem;
    opacity: 0.78;
}

.footer-grid {
    display: grid;
    grid-template-rows: repeat(auto-fit, minmax(50px, 0.25fr));
    gap: 0.2rem;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .navbar .container {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-right {
        width: 100%;
        justify-content: space-between;
    }

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

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

    .section {
        padding: 2.5rem 0;
    }
}

@media (max-width: 480px) {
    .nav-right {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links a {
        margin-left: 0;
    }

    .dropdown {
        left: 0;
        right: auto;
    }
}
