/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Selective transitions only on interactive elements */
a, button, .nav-link, .skill-tag, .contact-method, .btn-primary, .btn-secondary, .btn-download, .btn-fullscreen, .nav-social-link, .profile-img {
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scroll-triggered animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animation classes for JavaScript to apply */
.reveal-section {
    opacity: 0;
    transform: translateY(40px);
}

.reveal-skill {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #0a1a1a;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(10, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                backdrop-filter 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

.navbar-scrolled {
    background-color: rgba(10, 26, 26, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-logo span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00d4aa;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link:hover {
    color: #00d4aa;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00d4aa;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 3px 0;
    transition: 0.3s;
}

/* Navigation Social Links */
.nav-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-social-link {
    width: 40px;
    height: 40px;
    background: rgba(0, 212, 170, 0.1);
    border: 2px solid rgba(0, 212, 170, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00d4aa;
    text-decoration: none;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
}

.nav-social-link:hover {
    background: #00d4aa;
    color: #0a1a1a;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.4);
}

/* Hero Section */
.hero {
    min-height: 66vh; /* ~2/3 of previous height to bring About closer */
    display: flex;
    align-items: center;
    position: relative;
    background: transparent; /* clear to reveal background shapes */
    padding-top: 27px; /* ~1/3 of previous 80px */
}

/* Hero initial state for animations */
.hero-image {
    opacity: 0;
    transform: translateX(-50px);
    animation: fadeInLeft 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.hero-intro {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
    align-items: center;
    min-height: 56vh; /* ~2/3 of previous 85vh */
}

.hero-image {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.profile-img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    object-fit: cover;
    filter: grayscale(20%);
    transition: filter 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-img:hover {
    filter: grayscale(0%);
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 212, 170, 0.2);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 212, 170, 0.1), transparent);
    border-radius: 20px;
    pointer-events: none;
}

.hero-text {
    padding-left: 2.5rem;
}

.greeting {
    color: #00d4aa;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    display: block;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff, #00d4aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-description {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4aa, #00b894);
    color: #0a1a1a;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 212, 170, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border-color: #00d4aa;
}

.btn-secondary:hover {
    background: #00d4aa;
    color: #0a1a1a;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.3);
}



/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 1.2rem; /* 1/3 previous spacing */
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #00d4aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #00d4aa, #00b894);
    margin: 0 auto;
    border-radius: 2px;
}

/* About Section */
.about {
    padding: 2rem 0; /* 1/3 of previous 6rem */
    background: transparent; /* clear to reveal background shapes */
    position: relative;
    z-index: 1;
    content-visibility: auto;
    contain-intrinsic-size: auto 700px;
}

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

.about-text p {
    font-size: 1.1rem;
    color: #cccccc;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.skills {
    margin-top: 4rem;
}

.skills h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #00d4aa;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
}

.skill-tag {
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    color: #00d4aa;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.skill-tag:hover {
    background: rgba(0, 212, 170, 0.2);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 212, 170, 0.2);
}

/* Resume Section */
.resume-section {
    padding: 2rem 0; /* 1/3 of previous 6rem */
    background: transparent; /* keep section clear so background polygons are always visible */
    position: relative;
    z-index: 1;
    content-visibility: auto;
    contain-intrinsic-size: auto 900px;
}

.resume-content {
    max-width: 1000px;
    margin: 0 auto;
}

.resume-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-download, .btn-fullscreen {
    padding: 0.8rem 1.5rem;
    background: rgba(0, 212, 170, 0.1);
    border: 2px solid rgba(0, 212, 170, 0.3);
    color: #00d4aa;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: inherit;
}

.btn-download:hover, .btn-fullscreen:hover {
    background: rgba(0, 212, 170, 0.2);
    transform: translateY(-2px);
}

.resume-viewer {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    background: #ffffff;
}

#resume-iframe {
    border: none;
    border-radius: 15px;
    display: block;
}

/* Contact Section */
.contact {
    padding: 2rem 0; /* 1/3 of previous 6rem */
    background: transparent; /* clear to reveal background shapes */
    position: relative;
    z-index: 1;
    content-visibility: auto;
    contain-intrinsic-size: auto 400px;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-description {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 3rem;
    line-height: 1.7;
}

.contact-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
    text-decoration: none;
    padding: 1rem 2rem;
    background: rgba(0, 212, 170, 0.1);
    border: 2px solid rgba(0, 212, 170, 0.3);
    border-radius: 50px;
    transition: all 0.3s ease;
    min-width: 250px;
    justify-content: center;
}

.contact-method:hover {
    background: rgba(0, 212, 170, 0.2);
    transform: translateY(-2px);
    color: #00d4aa;
}

.contact-method i {
    font-size: 1.2rem;
}

/* Footer */
.footer {
    padding: 2rem 0;
    background: #0a1a1a;
    text-align: center;
    color: #888888;
    border-top: 1px solid #2d4d4d;
}

/* Responsive Design */
/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .hero-description {
        font-size: 1.1rem;
        max-width: 450px;
    }

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

/* Tablets */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: 0;
        top: 70px;
        flex-direction: column;
        background-color: rgba(10, 26, 26, 0.98);
        width: 100%;
        text-align: center;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 2rem 0;
        will-change: transform;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-social {
        position: fixed;
        left: 0;
        top: 280px;
        width: 100%;
        justify-content: center;
        background-color: rgba(10, 26, 26, 0.98);
        padding: 1rem 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-top: 1px solid rgba(0, 212, 170, 0.2);
        will-change: transform;
    }

    .nav-social.active {
        transform: translateX(0);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-text {
        padding-left: 0;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero-description {
        font-size: 1.05rem;
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        min-width: 200px;
        justify-content: center;
    }

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

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

    .resume-controls {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    #resume-iframe {
        height: 600px;
    }
}

/* Small tablets */
@media (max-width: 640px) {
    .hero-title {
        font-size: 1.9rem;
        line-height: 1.3;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
    }

    .greeting {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .nav-logo span {
        font-size: 1.3rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .skills h3 {
        font-size: 1.3rem;
    }

    .contact-description {
        font-size: 1.1rem;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
        line-height: 1.3;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .hero-container {
        padding: 0 15px;
    }

    .btn-primary, .btn-secondary {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
        min-width: 180px;
    }

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

    .greeting {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .about-text p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .skills h3 {
        font-size: 1.2rem;
    }

    .skill-tag {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .contact-method {
        min-width: auto;
        width: 100%;
        padding: 0.8rem 1rem;
    }

    .contact-description {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.4rem;
    }

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

    .btn-primary, .btn-secondary {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        min-width: 160px;
    }

    .nav-logo span {
        font-size: 1.2rem;
    }
}


/* === Background layers and visual enhancements === */

/* Ensure content sits above background layers */
body {
    position: relative;
    line-height: 1.7;
}

.navbar, section {
    position: relative;
    z-index: 1;
}

/* Animated aurora background */
:root {
    --aurora-a: #00d4aa1f;
    --aurora-b: #3dd6b61a;
}

body::before {
    content: "";
    position: fixed;
    inset: -20% -10%;
    background:
        radial-gradient(40rem at 10% 10%, var(--aurora-a), transparent 60%),
        radial-gradient(50rem at 90% 0%,  var(--aurora-b), transparent 65%),
        radial-gradient(55rem at 50% 120%, #1e4b431c, transparent 60%);
    filter: blur(30px);
    animation: aurora-move 32s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -3;
}

@keyframes aurora-move {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-4%, 2%, 0) scale(1.04); }
}

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

    body::before { animation: none; }
}

/* Subtle dotted grid overlay */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask: radial-gradient(circle at 50% 30%, rgba(0, 0, 0, 0.9), transparent 70%);
    mask: radial-gradient(circle at 50% 30%, rgba(0, 0, 0, 0.9), transparent 70%);
}

/* Hero geometric glow shapes */
.hero::before, .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero::before {
    background: radial-gradient(18rem at 20% 40%, #00d4aa2e, transparent 60%);
    filter: blur(25px);
    transform: translateY(-6%);
}

.hero::after {
    background: radial-gradient(20rem at 80% 60%, #3dd6b629, transparent 60%);
    filter: blur(30px);
    transform: translateY(4%);
}

.hero > .hero-container {
    position: relative;
    z-index: 1;
}

/* Glassmorphism panels */
.about .container,
.resume-section .container,
.contact .container {
    background: rgba(255, 255, 255, 0.125); /* +25% opacity */
    border: 1px solid rgba(255, 255, 255, 0.20); /* +25% */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    position: relative;
    z-index: 2;
}


/* Typography polish */
.hero-title { letter-spacing: 0.5px; }
.hero-description, .about-text p, .contact-description { color: #d6d6d6; }

/* Active nav link styling */
.nav-link.active { color: #00d4aa; }
