/* ---------- ROOT VARIABLES ---------- */
:root {
    --bg-primary: #111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222;
    --text-primary: #fff;
    --text-secondary: #c4c4c4;
    --text-muted: #aaa;
    --accent: #ffffff;
    --accent-dim: rgba(255,255,255,0.12);
    --accent-strong: rgba(255,255,255,0.25);
    --border-color: #2a2a2a;
    --border-light: rgba(255,255,255,0.06);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(255,255,255,0.04);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ---------- RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.portfolio-card {
    width: 100vw;
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ---------- FADE-IN ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(6px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* ---------- NAVBAR ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px 32px;
    background: transparent;
    transition: var(--transition);
    backdrop-filter: none;
}

.navbar.scrolled {
    background: rgba(17,17,17,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    background: transparent;
    border: none;
    z-index: 1001;
    position: absolute;
    right: 32px;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 4px;
    transition: var(--transition);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.navbar ul {
    display: flex;
    list-style: none;
    gap: 8px;
    transition: var(--transition);
    margin: 0;
    padding: 0;
}

.navbar a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    text-transform: lowercase;
    transition: var(--transition);
    padding: 10px 22px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    position: relative;
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.navbar a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.navbar a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-light);
    transform: translateY(-2px) scale(1.03);
    box-shadow: var(--shadow-sm);
}

.navbar a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 30px rgba(255,255,255,0.05);
    transform: translateY(-1px);
}

.navbar a.active::after {
    transform: translateX(-50%) scaleX(1);
}

.navbar a.active:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px) scale(1.03);
}

/* ============================================================
   HERO – SECTION 1 (Slideshow)
   ============================================================ */
.hero-fullscreen {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.visual-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slideshow container */
.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #111;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    transform: scale(1.02);
    will-change: opacity;
}

.hero-slide.active {
    opacity: 1;
}

.hero-top-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-cta {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 14px 44px;
    border: 1.5px solid var(--accent);
    border-radius: 30px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: clamp(14px, 1vw, 16px);
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    background: transparent;
    letter-spacing: 0.05em;
    display: inline-block;
    text-align: center;
    box-shadow: 0 0 0 0 rgba(255,255,255,0);
}

.hero-cta:hover {
    background: var(--accent);
    color: var(--bg-primary);
    transform: translateX(-50%) translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255,255,255,0.15);
}

.hero-cta:active {
    transform: translateX(-50%) scale(0.97);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: bounce-down 2s infinite;
}

.scroll-indicator i {
    font-size: 16px;
}

@keyframes bounce-down {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* Dots indicator */
.hero-dots {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
}

.hero-dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

.hero-dot:hover {
    background: rgba(255,255,255,0.6);
}

/* ============================================================
   HERO – SECTION 2
   ============================================================ */
.intro-section {
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
}

.intro-content {
    max-width: 1200px;
    width: 100%;
    padding: 40px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
}

.intro-text {
    flex: 1;
    max-width: 600px;
}

.intro-text h1 {
    font-size: clamp(36px, 5.5vw, 64px);
    font-weight: 300;
    margin-bottom: 12px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    white-space: nowrap;
}

.intro-text h1 .dot {
    color: var(--accent);
    display: inline-block;
    animation: dot-blink 1s infinite;
}

@keyframes dot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.intro-text p {
    color: var(--text-secondary);
    font-size: clamp(16px, 1.8vw, 22px);
    line-height: 1.7;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.profile-placeholder {
    flex-shrink: 0;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 60px rgba(255,255,255,0.04);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.profile-placeholder:hover {
    box-shadow: 0 0 80px rgba(255,255,255,0.08);
    transform: scale(1.02);
}

.profile-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- SCROLL‑REVEAL ---------- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    filter: blur(8px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* ---------- SECTIONS ---------- */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 24px 50px;
    width: 100%;
    text-align: center;
}

.section h2 {
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 300;
    margin-bottom: 44px;
    letter-spacing: 0.04em;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--accent);
    opacity: 0.3;
    border-radius: 2px;
}

.section h2 span {
    color: var(--accent);
    font-weight: 400;
}

/* ---------- ABOUT ---------- */
.about-content {
    max-width: 780px;
    width: 100%;
    text-align: center;
    line-height: 2;
    color: var(--text-secondary);
    font-size: clamp(15px, 1.4vw, 18px);
    padding: 0 10px;
}

.about-content p {
    margin-bottom: 20px;
}

.about-content .highlight {
    color: var(--accent);
    font-weight: 500;
}

.about-content .location {
    color: #888;
    font-size: 15px;
    margin-top: 12px;
}

.about-content .location i {
    color: var(--accent);
    margin-right: 8px;
}

/* ---------- PROJECTS GRID ---------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 30px;
    max-width: 1140px;
    width: 100%;
    justify-items: center;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    max-width: 340px;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    width: 100%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(255,255,255,0.03);
}

.project-card:active {
    transform: scale(0.98);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card .project-content {
    padding: 22px 22px 26px;
    text-align: left;
}

.project-card i {
    font-size: 30px;
    color: var(--accent);
    margin-bottom: 12px;
    display: inline-block;
    opacity: 0.7;
}

.project-card h3 {
    font-weight: 500;
    font-size: 19px;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.project-card p {
    color: #b0b0b0;
    font-size: 14px;
    line-height: 1.7;
    font-weight: 300;
}

/* ---------- CONTACT ---------- */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
    max-width: 1100px;
    width: 100%;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 440px;
    text-align: left;
}

.contact-form .form-group {
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    padding: 18px 22px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    width: 100%;
    -webkit-appearance: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.1), inset 0 2px 4px rgba(0,0,0,0.2);
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

.contact-form button {
    align-self: center;
    padding: 15px 50px;
    background: transparent;
    border: 1.5px solid var(--accent);
    border-radius: 30px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.05em;
    font-family: 'Poppins', sans-serif;
    margin-top: 6px;
    width: auto;
    min-width: 180px;
    box-shadow: 0 0 0 0 rgba(255,255,255,0);
}

.contact-form button:hover {
    background: var(--accent);
    color: var(--bg-primary);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255,255,255,0.15);
}

.contact-form button:active {
    transform: scale(0.97);
}

.form-feedback {
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
    min-height: 24px;
    transition: var(--transition);
}
.form-feedback.success {
    color: #4ade80;
}
.form-feedback.error {
    color: #f87171;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding-top: 4px;
}

.contact-info .label {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 16px;
    font-weight: 400;
    letter-spacing: 0.03em;
}

.social-links {
    display: flex;
    gap: 18px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--text-muted);
    font-size: 24px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-4px) scale(1.05);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.social-links a:active {
    transform: scale(0.92);
}

.contact-details {
    color: #ccc;
    line-height: 2.4;
    font-size: 15px;
}

.contact-details p {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 4px 0;
}

.contact-details i {
    color: var(--accent);
    width: 22px;
    font-size: 17px;
    text-align: center;
    flex-shrink: 0;
}

.contact-details a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
    word-break: break-all;
}

.contact-details a:hover {
    color: var(--accent);
}

/* ---------- FOOTER ---------- */
.footer {
    text-align: center;
    padding: 36px 20px;
    color: #555;
    font-size: 13px;
    border-top: 1px solid var(--border-color);
    width: 100%;
    letter-spacing: 0.04em;
}

.footer i {
    color: var(--accent);
    margin: 0 4px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
    .hero { padding: 100px 30px 50px; gap: 20px; }
    .left { padding-left: 10px; }
    .content p { max-width: 100%; }
    .right img { max-height: 70vh; filter: drop-shadow(0 0 36px rgba(255,255,255,0.05)); transform: scale(1.04); }
    .right img:hover { transform: scale(1.06); }
    .profile-placeholder { width: 220px; height: 220px; }
    .intro-content { gap: 50px; padding: 40px; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .navbar ul {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(17, 17, 17, 0.95);
        backdrop-filter: blur(30px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 16px;
        transform: translateX(100%);
        transition: var(--transition);
        padding: 40px 20px;
        z-index: 999;
        margin: 0;
    }
    .navbar ul.open { transform: translateX(0); }
    .navbar a {
        font-size: 22px;
        font-weight: 400;
        padding: 14px 44px;
        border-radius: 60px;
        background: transparent;
        backdrop-filter: none;
        border: none;
        box-shadow: none;
        color: rgba(255,255,255,0.7);
        width: auto;
        text-align: center;
        display: inline-block;
    }
    .navbar a::after { display: none; }
    .navbar a:hover {
        background: rgba(255,255,255,0.06);
        backdrop-filter: blur(8px);
        border: 1px solid var(--border-light);
        transform: scale(1.05);
        color: var(--text-primary);
    }
    .navbar a.active {
        color: #fff;
        background: rgba(255,255,255,0.12);
        backdrop-filter: blur(16px);
        border: 1px solid rgba(255,255,255,0.15);
        box-shadow: 0 4px 30px rgba(255,255,255,0.05);
        transform: none;
    }
    .navbar a.active:hover {
        background: rgba(255,255,255,0.18);
        transform: scale(1.05);
    }

    .hero { flex-direction: column; min-height: 100vh; padding: 100px 20px 40px; justify-content: center; text-align: center; }
    .left { padding: 0; width: 100%; text-align: center; }
    .content h1 { font-size: clamp(28px, 8vw, 40px); }
    .content p { font-size: 15px; margin: 0 auto 24px; max-width: 90%; }
    .btn { padding: 14px 40px; font-size: 15px; display: inline-block; min-width: 180px; }
    .right { width: 100%; min-height: 300px; padding: 10px 0; }
    .right img { max-height: 60vh; max-width: 90%; filter: drop-shadow(0 0 30px rgba(255,255,255,0.05)); transform: scale(1.02); }
    .right img:hover { transform: scale(1.04); }

    .intro-content { flex-direction: column-reverse; text-align: center; gap: 30px; padding: 30px 20px; }
    .intro-text { text-align: center; max-width: 100%; }
    .intro-text h1 { font-size: clamp(28px, 6vw, 38px); white-space: nowrap; }
    .intro-text p { font-size: 15px; }
    .profile-placeholder { width: 180px; height: 180px; }

    .section { padding: 90px 16px 30px; min-height: auto; }
    .section h2 { font-size: clamp(26px, 6vw, 34px); margin-bottom: 34px; }
    .projects-grid { grid-template-columns: 1fr; gap: 24px; max-width: 400px; }
    .project-link { max-width: 100%; }
    .project-card img { height: 180px; }
    .contact-wrapper { flex-direction: column; align-items: center; gap: 40px; }
    .contact-form { max-width: 100%; text-align: center; }
    .contact-form input, .contact-form textarea { font-size: 15px; padding: 16px 20px; border-radius: 12px; }
    .contact-form button { width: 100%; max-width: 280px; padding: 15px 20px; font-size: 15px; min-width: unset; }
    .contact-info { text-align: center; align-items: center; width: 100%; }
    .social-links { justify-content: center; gap: 16px; }
    .social-links a { width: 52px; height: 52px; font-size: 22px; }
    .contact-details { text-align: center; font-size: 14px; width: 100%; }
    .contact-details p { justify-content: center; flex-wrap: wrap; }
    .about-content { font-size: 15px; padding: 0 4px; line-height: 1.9; }
    .footer { font-size: 12px; padding: 28px 16px; }

    .hero-dots { bottom: 60px; gap: 8px; }
    .hero-dot { width: 8px; height: 8px; }
}

@media (max-width: 420px) {
    .navbar { padding: 14px 16px; }
    .hamburger { right: 16px; }
    .hamburger span { width: 24px; height: 2px; }
    .navbar a { font-size: 19px; padding: 12px 32px; }
    .hero { padding: 90px 14px 30px; }
    .content h1 { font-size: clamp(24px, 7vw, 32px); }
    .content p { font-size: 14px; }
    .btn { padding: 12px 32px; font-size: 14px; min-width: 150px; }
    .right img { max-height: 45vh; max-width: 95%; filter: drop-shadow(0 0 24px rgba(255,255,255,0.05)); transform: scale(1); }
    .section { padding: 80px 12px 24px; }
    .section h2 { font-size: 24px; margin-bottom: 28px; }
    .project-card img { height: 160px; }
    .project-card .project-content { padding: 18px 18px 22px; }
    .intro-text h1 { font-size: clamp(20px, 5.5vw, 26px); white-space: nowrap; }
    .intro-text p { font-size: 13px; }
    .profile-placeholder { width: 140px; height: 140px; }
    .contact-form input, .contact-form textarea { font-size: 14px; padding: 14px 16px; border-radius: 10px; }
    .contact-form button { font-size: 14px; padding: 13px 16px; }
    .social-links a { width: 44px; height: 44px; font-size: 19px; }
    .contact-details { font-size: 13px; }
    .about-content { font-size: 14px; }
    .hero-dots { bottom: 50px; gap: 6px; }
    .hero-dot { width: 6px; height: 6px; }
}

@media (max-height: 600px) and (orientation: landscape) {
    .hero { min-height: auto; padding: 100px 30px 30px; }
    .right img { max-height: 50vh; }
    .section { min-height: auto; padding: 80px 20px 30px; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}