/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --primary: #2d9ea6;
    --primary-dark: #1f3a2e;
    --accent: #e67e3e;
    --accent-light: #f5a574;
    --white: #ffffff;
    --light-bg: #f7f8f6;
    --muted-bg: #e8ebe8;
    --text-dark: #1b1d1b;
    --text-secondary: #576358;
    --border: #d4dcd3;
    --focus-ring: #003e6b;
    --success: #2d9ea6;
    --error: #c71c3b;
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    width: 100%;
}

body {
    font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--white);
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Lato", sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: var(--accent);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section {
    padding: 3.5rem 0;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.scrolled {
    opacity: 1;
    transform: translateY(0);
}

.section-muted {
    background: var(--light-bg);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
    background: var(--white);
    z-index: 60;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.1rem;
    transition: color 0.25s ease;
}

.brand:hover {
    color: var(--primary);
}

.brand-logo {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.4rem;
}

.nav-primary {
    display: none;
    align-items: center;
    gap: 0;
    margin-left: auto;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-list a {
    font-weight: 600;
    color: var(--text-dark);
    transition: color 0.25s ease;
    position: relative;
}

.nav-list a:hover {
    color: var(--primary);
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-list a:hover::after {
    width: 100%;
}

@media (min-width: 901px) {
    .nav-primary {
        display: flex;
    }
}

.btn-download {
    background: var(--accent) !important;
    color: var(--white) !important;
    padding: 0.65rem 1.2rem !important;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: all 0.25s ease;
    margin-left: 2rem;
    box-shadow: 0 2px 8px rgba(230, 126, 62, 0.15);
}

.btn-download:hover {
    background: var(--accent-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 62, 0.25);
}

.download-cv-mobile {
    display: block;
    background: var(--accent);
    color: var(--white);
    padding: 1rem 0;
    margin-top: 2rem;
    text-align: center;
    font-weight: 700;
    border-radius: 6px;
    width: 100%;
    transition: all 0.3s ease;
}

.download-cv-mobile:hover {
    background: var(--accent-light);
    transform: scale(1.02);
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.7rem;
    transition: all 0.3s ease;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.menu-open .menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
    background: var(--accent);
}

body.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
    background: var(--accent);
}

@media (min-width: 901px) {
    .menu-toggle {
        display: none;
    }
}

/* ============================================
   MOBILE MENU OVERLAY
   ============================================ */
#nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(31, 58, 46, 0.96);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 50;
    overflow-y: auto;
    overflow-x: hidden;
}

body.menu-open #nav-overlay {
    opacity: 1;
    pointer-events: auto;
}

.menu-overlay-inner {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    padding-top: 100px;
}

.menu-links {
    list-style: none;
    text-align: center;
}

.menu-links li {
    margin: 1.5rem 0;
}

.menu-links a {
    display: block;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.menu-links a:hover {
    color: var(--accent);
    transform: translateX(10px);
}

/* ============================================
   HERO SECTION - FULL SCREEN
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
    background: linear-gradient(135deg, #2d5f67 0%, #1f3a2e 100%);
    margin-top: 0;
    padding-top: 70px;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 3rem 1.25rem;
    max-width: 65ch;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 0.5rem;
    font-size: 2.8rem;
    animation: slideInUp 0.8s ease 0.2s both;
}

.hero-subtitle {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    animation: slideInUp 0.8s ease both;
}

.hero-lede {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    max-width: 50ch;
    line-height: 1.8;
    animation: slideInUp 0.8s ease 0.4s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: slideInUp 0.8s ease 0.6s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   SCROLL INDICATOR - ENHANCED & OBVIOUS
   ============================================ */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    animation: fadeInIndicator 1s ease 1s both;
}

.scroll-text {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.9;
    animation: pulse 2s infinite;
}

.scroll-arrow {
    width: 28px;
    height: 28px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2.5;
    animation: bounce 2s infinite;
}

.scroll-arrow:nth-child(3) {
    animation: bounce 2s infinite 0.15s;
    opacity: 0.7;
}

@keyframes bounce {
    0% {
        transform: translateY(-8px);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(8px);
        opacity: 0.3;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 0.4;
    }
}

@keyframes fadeInIndicator {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.8rem 1.3rem;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 62, 0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
.portfolio-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 16/9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 3px solid transparent;
    background-clip: padding-box;
}

/* ============================================
   PORTFOLIO CARD BORDER ANIMATION
   ============================================ */
.portfolio-card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(
        45deg,
        var(--accent),
        var(--primary),
        var(--accent-light),
        var(--primary)
    );
    background-size: 400% 400%;
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    animation: none;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover::before {
    opacity: 1;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.portfolio-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--light-bg);
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.08);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(31, 58, 46, 0.85);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    z-index: 2;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-title {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.portfolio-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.portfolio-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tool-tag {
    background: rgba(230, 126, 62, 0.25);
    color: var(--accent-light);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   PORTFOLIO DOWNLOAD SECTION
   ============================================ */
.portfolio-download {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    background: var(--accent);
    color: var(--white);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    justify-content: center;
    animation: slideUp 0.3s ease forwards;
    opacity: 0;
}

.portfolio-card:hover .portfolio-download {
    animation: slideUp 0.3s ease 0.1s forwards;
    background: var(--accent-light);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.download-icon {
    font-size: 1.2rem;
    animation: bounce 1.5s ease-in-out infinite;
}

.portfolio-card:hover .download-icon {
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.download-text {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    color: var(--primary-dark);
    margin-bottom: 0.8rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    align-items: center;
}

@media (min-width: 768px) {
    .about-content {
        grid-template-columns: 1fr 1.2fr;
    }
}

.about-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    background: var(--light-bg);
}

.about-text h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .about-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.skills-column h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.skill-name {
    font-weight: 600;
    color: var(--text-dark);
}

.skill-rating {
    font-size: 0.85rem;
}

.expertise-list {
    list-style: none;
}

.expertise-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-info {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: var(--primary-dark);
    border-radius: 12px;
    text-align: center;
}

.contact-info h3 {
    color: var(--white);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item:last-child {
    border-bottom: none;
}

@media (min-width: 768px) {
    .contact-item {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }
}

.contact-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

@media (min-width: 768px) {
    .contact-label {
        margin-bottom: 0;
        min-width: 150px;
    }
}

.contact-value {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-value a {
    color: var(--accent);
    text-decoration: none;
}

.contact-value a:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--primary-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    color: var(--white);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-lede {
        font-size: 1rem;
    }

    .scroll-indicator {
        bottom: 30px;
    }

    .scroll-text {
        font-size: 0.85rem;
    }

    .scroll-arrow {
        width: 24px;
        height: 24px;
    }
}
