/* ==========================================================================
   DESIGN SYSTEM & CUSTOM VARIABLES (Inspiración Girasoles / Atardecer Cálido)
   ========================================================================== */

:root {
    /* Color Palette - HSL Tailored for a Warm Sunset Sunflower Theme */
    --primary-hue: 38;      /* Sunflower Gold */
    --secondary-hue: 18;    /* Sunset Amber/Orange */
    
    /* Dark Theme Default Values (Warm Charcoal & Gold Glows) */
    --bg-base: #110e0c;     /* Deep warm dark brown/black */
    --bg-surface: rgba(26, 21, 18, 0.65); /* Frosted warm amber glass */
    --bg-surface-opaque: #1b1512;
    --border-color: rgba(245, 158, 11, 0.08); /* Faint gold border */
    --border-color-hover: rgba(245, 158, 11, 0.3); /* Bright gold accent border */
    
    --text-primary: #fbf9f6; /* Warm cream-white */
    --text-secondary: #d6ceb8; /* Warm sandy gray */
    --text-muted: #8e8473; /* Muted stone */
    
    --accent-ocean: hsl(var(--primary-hue), 92%, 50%); /* Sunflower Gold (#f59e0b) */
    --accent-tech: hsl(var(--secondary-hue), 85%, 48%); /* Amber Orange (#d95306) */
    --accent-glow: rgba(245, 158, 11, 0.08);
    
    /* Soft, diffused, premium shadows with organic warmth */
    --shadow-sm: 0 4px 12px rgba(18, 12, 6, 0.15);
    --shadow-md: 0 16px 40px -12px rgba(18, 12, 6, 0.35);
    --shadow-lg: 0 32px 64px -16px rgba(18, 12, 6, 0.55);
    --shadow-glow: 0 0 30px rgba(245, 158, 11, 0.15);

    /* Typography & Fonts */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    
    --nav-height: 90px;
}

/* Light Theme Variables (Cream Soft Sunlights & Charcoal Contrast) */
[data-theme="light"] {
    --bg-base: #f9f7f2;     /* Smooth warm cream */
    --bg-surface: rgba(255, 255, 255, 0.72); /* Glassy warm white */
    --bg-surface-opaque: #ffffff;
    --border-color: rgba(139, 92, 26, 0.07);
    --border-color-hover: rgba(217, 119, 6, 0.35);
    
    --text-primary: #1e1b18; /* Elegant deep charcoal-brown */
    --text-secondary: #575249; /* Medium warm gray */
    --text-muted: #8a8276;
    
    --accent-ocean: #d97706; /* Sunset Amber */
    --accent-tech: #b45309; /* Deep sunflower stem bronze */
    --accent-glow: rgba(217, 119, 6, 0.06);
    
    --shadow-sm: 0 4px 12px rgba(139, 92, 26, 0.04);
    --shadow-md: 0 16px 40px -12px rgba(139, 92, 26, 0.08);
    --shadow-lg: 0 32px 64px -16px rgba(139, 92, 26, 0.12);
    --shadow-glow: 0 0 30px rgba(217, 119, 6, 0.1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: rgba(217, 119, 6, 0.2);
    border-radius: 5px;
    border: 2px solid var(--bg-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-ocean);
}

/* Typography Selection */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em; /* Tight typography matching high-end designs */
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   LAYOUT REUSABLE UTILITIES
   ========================================================================== */

.section-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 24px; /* More breathing room */
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-ocean);
    margin-bottom: 8px;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-ocean), var(--accent-tech));
    margin: 12px auto 0 auto;
    border-radius: 2px;
}

/* Pill Buttons styling - Inspired by the 'Get Early Access' and 'Get in touch' rounded pills */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 99px; /* Absolute pill shapes */
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

/* Primary Button is highly contrasting */
.btn-primary {
    background: var(--text-primary);
    color: var(--bg-base);
    border: 1px solid var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    box-shadow: var(--shadow-md);
}

/* Secondary is an outline pill */
.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-color-hover);
}

.btn-secondary:hover {
    background: rgba(245, 158, 11, 0.05);
    border-color: var(--accent-ocean);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    height: 75px;
    background-color: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.3rem;
    font-family: var(--font-heading);
}

.logo-symbol {
    color: var(--accent-ocean);
    font-weight: 800;
}

.nav-menu ul {
    display: flex;
    gap: 36px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 6px 0;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-ocean), var(--accent-tech));
    transition: all var(--transition-fast);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link.active {
    color: var(--text-primary);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    outline: none;
}

.theme-toggle:hover {
    border-color: var(--border-color-hover);
    background-color: var(--bg-surface);
    color: var(--accent-ocean);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Theme icons toggle configuration */
[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block;
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

/* Hamburger mobile button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 2.5px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all var(--transition-fast);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--nav-height) + 20px);
    overflow: hidden;
}

/* Large warm glowing background representing the setting sun */
.hero-bg-glow {
    position: absolute;
    top: 5%;
    right: 5%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.02) 60%, rgba(0, 0, 0, 0) 80%);
    z-index: 0;
    pointer-events: none;
    filter: blur(40px);
}

[data-theme="light"] .hero-bg-glow {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.16) 0%, rgba(217, 119, 6, 0.04) 60%, rgba(0, 0, 0, 0) 80%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-greeting {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-ocean);
    margin-bottom: 12px;
}

.hero-title {
    font-size: clamp(3.2rem, 6.5vw, 4.8rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 20px;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent-ocean) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.3rem, 2.5vw, 1.85rem);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 28px;
    min-height: 40px;
    letter-spacing: -0.02em;
}

.typewriter {
    background: linear-gradient(90deg, var(--accent-ocean), var(--accent-tech));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cursor {
    font-weight: 300;
    animation: blink 0.8s infinite;
    color: var(--accent-tech);
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 44px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Hero Visual Graphic (Glassmorphism & Large Radii) */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1;
}

.visual-card {
    width: 100%;
    height: 100%;
    border-radius: 32px; /* Large rounded corners matching the sunflower graphic */
    padding: 1.5px;
    background: linear-gradient(135deg, var(--border-color-hover), transparent);
    position: relative;
    box-shadow: var(--shadow-lg);
}

.card-inner {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background: var(--bg-surface);
    backdrop-filter: blur(24px); /* Higher frosted glass effect */
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    padding: 24px;
}

.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
    z-index: 0;
}

.visual-svg {
    width: 100%;
    max-width: 250px;
    height: auto;
    z-index: 1;
}

/* Force CSS Overrides for Inline SVG Colors to match Sunset Gold & Amber */
#ocean-grad stop:nth-child(1) {
    stop-color: var(--accent-ocean) !important;
}
#ocean-grad stop:nth-child(2) {
    stop-color: var(--accent-tech) !important;
}
#tech-grad stop:nth-child(1) {
    stop-color: var(--accent-tech) !important;
}
#tech-grad stop:nth-child(2) {
    stop-color: var(--accent-ocean) !important;
}

.visual-svg text:first-of-type {
    fill: var(--accent-ocean) !important;
}
.visual-svg text:last-of-type {
    fill: var(--accent-tech) !important;
}

.visual-svg circle.rot-clockwise {
    stroke: var(--accent-ocean) !important;
}
.visual-svg circle.rot-counter {
    stroke: var(--accent-tech) !important;
}

.visual-svg path[stroke="url(#tech-grad)"] {
    stroke: var(--accent-tech) !important;
}

.visual-overlay {
    position: absolute;
    bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    z-index: 2;
}

.badge-ocean, .badge-code {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 99px; /* Pill Badges */
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    background: var(--bg-surface-opaque);
    backdrop-filter: blur(8px);
}

.badge-ocean {
    border-left: 3px solid var(--accent-ocean) !important;
}

.badge-code {
    border-left: 3px solid var(--accent-tech) !important;
}

/* Scroll Down Mouse Indicator */
.scroll-down-indicator {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 48px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 2;
}

.scroll-down-indicator:hover {
    border-color: var(--accent-ocean);
}

.mouse-wheel {
    width: 4px;
    height: 8px;
    background-color: var(--text-muted);
    border-radius: 2px;
    animation: scroll-wheel 1.6s infinite;
}

.scroll-down-indicator:hover .mouse-wheel {
    background-color: var(--accent-ocean);
}

/* ==========================================================================
   ABOUT ME SECTION
   ========================================================================== */

.about-section {
    position: relative;
    border-top: 1px solid var(--border-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text-column p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.about-text-column p strong {
    color: var(--text-primary);
}

.about-text-column p:last-child {
    margin-bottom: 0;
}

/* Skills Cards Box (Glassmorphic) */
.skills-card {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 28px; /* Large Rounded corner */
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.skills-card h3 {
    font-size: 1.5rem;
    margin-bottom: 28px;
    background: linear-gradient(90deg, var(--accent-ocean), var(--accent-tech));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skills-group {
    margin-bottom: 28px;
}

.skills-group:last-child {
    margin-bottom: 0;
}

.skills-group-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.icon-small {
    width: 20px;
    height: 20px;
    color: var(--accent-ocean);
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(245, 158, 11, 0.03);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 12px; /* Rounded pill style tags */
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.tag:hover {
    border-color: var(--accent-ocean);
    color: var(--text-primary);
    background: rgba(245, 158, 11, 0.08);
    transform: translateY(-2px);
}

.tag.tech-tag:hover {
    border-color: var(--accent-tech);
    background: rgba(217, 83, 6, 0.08);
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */

.projects-section {
    background-color: rgba(245, 158, 11, 0.01);
    border-top: 1px solid var(--border-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 36px;
}

.project-card {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 28px; /* Large Rounded Corners */
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.project-card-header {
    padding: 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.project-icon {
    width: 36px;
    height: 36px;
}

/* Re-styled background gradients for card headers using Warm Sunset tones */
.tech-bg {
    background: linear-gradient(135deg, rgba(217, 83, 6, 0.08) 0%, rgba(217, 83, 6, 0.01) 100%);
}
.tech-bg .project-icon {
    color: var(--accent-tech);
}

.ocean-bg {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.01) 100%);
}
.ocean-bg .project-icon {
    color: var(--accent-ocean);
}

.hybrid-bg {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(217, 83, 6, 0.03) 100%);
}
.hybrid-bg .project-icon {
    color: var(--accent-ocean);
}

.project-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--bg-surface-opaque);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.project-card-body {
    padding: 36px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    flex-grow: 1;
    line-height: 1.65;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tech span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

.contact-section {
    border-top: 1px solid var(--border-color);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

.social-channels {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 340px;
}

.social-button {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 28px;
    border-radius: 16px; /* Pill-like rounded corners */
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
}

.social-icon {
    width: 22px;
    height: 22px;
}

.social-button:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
}

.linkedin-btn:hover {
    border-color: #d97706;
    color: #d97706;
    background-color: rgba(217, 119, 6, 0.05);
}

.github-btn:hover {
    border-color: #f59e0b;
    color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.05);
}

.email-btn:hover {
    border-color: var(--accent-tech);
    color: var(--accent-tech);
    background-color: rgba(217, 83, 6, 0.05);
}

/* Contact Form Card (Glassmorphic) */
.contact-form-card {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 32px; /* Extra round corner */
    padding: 44px;
    box-shadow: var(--shadow-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-ocean);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    border-top: 1px solid var(--border-color);
    padding: 50px 24px;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.copyright {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   ANIMATIONS & SCROLL EFFECTS
   ========================================================================== */

/* Keyframe animations for Hero graphic */
.rot-clockwise {
    transform-origin: center;
    animation: spin-cw 32s linear infinite;
}

.rot-counter {
    transform-origin: center;
    animation: spin-ccw 22s linear infinite;
}

@keyframes spin-cw {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin-ccw {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

/* SVG Waves gliding */
.wave-anim-1 {
    animation: wave-glide-1 4.5s ease-in-out infinite alternate;
}

.wave-anim-2 {
    animation: wave-glide-2 3.8s ease-in-out infinite alternate;
}

@keyframes wave-glide-1 {
    0% { d: path("M 55 118 Q 70 110 85 118 T 115 118 T 145 118"); }
    100% { d: path("M 55 118 Q 70 126 85 118 T 115 118 T 145 118"); }
}

@keyframes wave-glide-2 {
    0% { d: path("M 55 123 Q 70 129 85 123 T 115 123 T 145 123"); }
    100% { d: path("M 55 123 Q 70 117 85 123 T 115 123 T 145 123"); }
}

/* Scroll reveal initial states */
.reveal-text, .project-card, .skills-card {
    opacity: 0;
    transform: translateY(30px); /* Slightly deeper entry */
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-text.revealed, .project-card.revealed, .skills-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Classes for Hero */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(40px);
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up-delayed {
    opacity: 0;
    transform: translateY(40px);
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.animate-fade-in-delayed {
    opacity: 0;
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.animate-scale-in {
    opacity: 0;
    transform: scale(0.92);
    animation: scaleIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

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

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scroll-wheel {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(14px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE DESIGN Breakpoints
   ========================================================================== */

@media (max-width: 992px) {
    .hero-container {
        gap: 40px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 44px;
    }
    
    .contact-info {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 80px;
    }
    
    .section-container {
        padding: 80px 20px;
    }
    
    /* Navigation drawer overlay on Mobile */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--bg-surface-opaque);
        box-shadow: var(--shadow-lg);
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right var(--transition-smooth);
        border-left: 1px solid var(--border-color);
    }
    
    .nav-menu.open {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    
    .nav-link {
        font-size: 1.25rem;
    }
    
    /* Hamburger Icon States */
    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    /* Hero layout mobile vertical stack */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 48px;
        padding-bottom: 40px;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1; /* Place image at the top of the stack on mobile */
    }
    
    .visual-wrapper {
        max-width: 300px;
    }
    
    .scroll-down-indicator {
        display: none; /* Hide scrolling wheel on mobile screens */
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .contact-form-card {
        padding: 32px 24px;
    }
}
