/* ============================================
   MAIN STYLES - Portfolio Website
   ============================================ */

/* CSS Variables for Theming - Minimalist Style with Accent */
:root {
    /* Minimalist Colors - Black & White with Purple Accent */
    --primary-color: #000000;
    --primary-dark: #1a1a1a;
    --primary-light: #333333;
    
    --accent-color: #563873;
    --accent-light: #7d5da1;
    --accent-hover: #3d2651;
    
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --bg-accent: #f7f7f7;
    
    --border-color: #e5e5e5;
    --border-accent: #d1d5db;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 30px rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* Spacing */
    --container-width: 1200px;
    --section-padding: 120px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s ease;
    --transition-slow: 0.6s ease;
}

/* Dark Theme - Minimalist with Accent */
[data-theme="dark"] {
    --primary-color: #ffffff;
    --primary-dark: #f5f5f5;
    --primary-light: #e5e5e5;
    
    --accent-color: #ffffff;
    --accent-light: #ffffff;
    --accent-hover: #000000;
    
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-tertiary: #c0c0c0;
    
    --bg-primary: #0a0a0a;
    --bg-secondary: #000000;
    --bg-tertiary: #1a1a1a;
    --bg-accent: #111111;
    
    --border-color: #333333;
    --border-accent: #404040;
    
    --shadow-sm: 0 1px 2px 0 rgba(255, 255, 255, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(255, 255, 255, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(255, 255, 255, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 0 40px rgba(255, 255, 255, 0.1);
}

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

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

/* Prevent scrolling when loading splash is visible */
body:has(.loading-splash:not(.hidden)) {
    overflow: hidden !important;
    height: 100vh;
}

/* ============================================
   LOADING SPLASH SCREEN
   ============================================ */

.loading-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background: var(--bg-primary);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0.8s ease, background 0.3s ease;
    overflow: hidden;
}

.loading-splash.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

.splash-title {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

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

.loader-dot {
    width: 12px;
    height: 12px;
    background: var(--text-primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.main-content {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease 0.2s, visibility 0.6s ease 0.2s;
}

.main-content.visible {
    opacity: 1;
    visibility: visible;
}

/* First 100vh Scale & Opacity Animation */
.main-content .header,
.main-content .hero {
    transform: scale(0.85);
    opacity: 0.5;
    filter: blur(6px);
    transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s, 
                opacity 0.8s ease 0.2s,
                filter 0.8s ease 0.2s;
}

.main-content.visible .header,
.main-content.visible .hero {
    transform: scale(1);
    opacity: 1;
    filter: blur(0);
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-primary);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-normal);
    height: 70px;
    align-items: center;
    align-content: center;
}

[data-theme="dark"] .header {
    background: rgba(10, 10, 10, 0.95);
}

/* Dark Theme Button Overrides - All White, Hover Black */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-outline,
[data-theme="dark"] .btn-light {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-outline:hover,
[data-theme="dark"] .btn-light:hover {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.3);
}

/* Dark Theme - Better Text Visibility */
[data-theme="dark"] .hero-subtitle,
[data-theme="dark"] .section-subtitle {
    color: #ffffff;
}

[data-theme="dark"] .hero-description,
[data-theme="dark"] .about-text,
[data-theme="dark"] .section-description {
    color: #e0e0e0;
}

[data-theme="dark"] .nav-link {
    color: #e0e0e0;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    color: #ffffff;
}

[data-theme="dark"] .nav-link.active::after {
    background: #ffffff;
}

.header.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
}

[data-theme="dark"] .header.scrolled {
    background: rgba(10, 10, 10, 0.98);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 2rem;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-text {
    color: var(--text-primary);
    font-weight: 800;
}

.logo-dot {
    color: var(--text-primary);
    font-size: 2.5rem;
    line-height: 1;
    font-weight: 900;
}

.logo-dev {
    color: var(--text-primary);
    font-weight: 600;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    transition: color var(--transition-fast);
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-primary);
    border-radius: 0;
    transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    background: var(--accent-color);
}

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

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    padding: 0.6rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    width: 45px;
    height: 45px;
}

.theme-toggle:hover {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-primary);
    transform: rotate(180deg) scale(1.05);
    box-shadow: var(--shadow-md);
}

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

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

[data-theme="dark"] .sun-icon {
    display: none;
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-normal);
    border-radius: 0;
}

.nav-toggle:hover span {
    background: var(--text-secondary);
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-padding) 0;
}

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

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 100px;
    padding-bottom: 100px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.hero-background::before {
    display: none;
}

.hero-background::after {
    display: none;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero-subtitle {
    font-size: 0.875rem;
    letter-spacing: 6px;
    color: var(--accent-color);
    margin-bottom: 3rem;
    font-weight: 500;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 6rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    position: relative;
    letter-spacing: -2px;
}

.hero-title .line {
    display: block;
    overflow: hidden;
}

.hero-title .line span {
    display: inline-block;
    opacity: 0;
    animation: letterReveal 0.8s ease forwards;
}

/* Letter by letter animation */
@keyframes letterReveal {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-description {
    font-size: 1.35rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 500;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: fixed;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.5s ease;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    animation: fadeInScroll 1s ease 2s forwards;
}

@keyframes fadeInScroll {
    to {
        opacity: 1;
        pointer-events: auto;
    }
}

.scroll-indicator.hidden {
    opacity: 0 !important;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

.scroll-indicator:hover {
    color: var(--accent-color);
    transform: translateX(-50%) translateY(-5px);
}

.scroll-line {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    position: relative;
    overflow: visible;
    transition: all var(--transition-normal);
}

.scroll-line::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 2px;
    animation: scrollDown 2s ease-in-out infinite;
}

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

.scroll-indicator:hover .scroll-line::before {
    background: var(--accent-color);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--bg-primary);
    box-shadow: none;
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(86, 56, 115, 0.3);
    background: var(--bg-primary);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    color: var(--accent-color);
    box-shadow: 0 8px 16px rgba(86, 56, 115, 0.3);
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-primary);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-light {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(86, 56, 115, 0.3);
    background: var(--accent-color);
    color: var(--bg-primary);
    border-color: var(--accent-color);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Prevent button size change during form submission */
.btn[type="submit"] {
    min-height: 56px;
    position: relative;
    overflow: hidden;
}

.btn[type="submit"] span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    font-size: 0.75rem;
    letter-spacing: 4px;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* ============================================
   PAGE HERO (Internal Pages)
   ============================================ */

.page-hero {
    padding: 120px 0 60px;
    text-align: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.page-subtitle {
    font-size: 0.875rem;
    letter-spacing: 3px;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.page-title {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.page-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: var(--bg-primary);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(86, 56, 115, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(86, 56, 115, 0.4);
    background: var(--accent-hover);
}

/* Dark Mode Back to Top */
[data-theme="dark"] .back-to-top {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .back-to-top:hover {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.4);
}

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

.footer {
    background: var(--text-primary);
    padding: 5rem 0 3rem;
    border-top: none;
    margin-top: 0;
    color: var(--bg-primary);
}

[data-theme="dark"] .footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

/* Dark Mode Footer Text Fixes */
[data-theme="dark"] .footer-logo .logo-text,
[data-theme="dark"] .footer-logo .logo-dot,
[data-theme="dark"] .footer-logo .logo-dev {
    color: #ffffff;
}

[data-theme="dark"] .footer-tagline {
    color: #b0b0b0;
}

[data-theme="dark"] .footer-title {
    color: #ffffff;
}

[data-theme="dark"] .footer-list a {
    color: #b0b0b0;
}

[data-theme="dark"] .footer-list a:hover {
    color: #ffffff;
}

[data-theme="dark"] .footer-list a::after {
    background: #ffffff;
}

[data-theme="dark"] .footer-bottom {
    color: #909090;
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .footer-social-link {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #b0b0b0;
}

[data-theme="dark"] .footer-social-link:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    max-width: 350px;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    margin-bottom: 1.5rem;
}

.footer-logo .logo-text {
    color: var(--bg-primary);
    font-weight: 800;
}

.footer-logo .logo-dot {
    color: var(--bg-primary);
    font-size: 2.5rem;
    line-height: 1;
}

.footer-logo .logo-dev {
    color: var(--bg-primary);
    font-weight: 600;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-links {
    display: contents;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bg-primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-list li {
    margin-bottom: 0;
}

.footer-list a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
    display: inline-block;
    position: relative;
}

.footer-list a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--bg-primary);
    transition: width var(--transition-normal);
}

.footer-list a:hover {
    color: var(--bg-primary);
}

.footer-list a:hover::after {
    width: 100%;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.footer-social-link:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--bg-primary);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

@keyframes scrollDown {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0);
    }
    40% {
        opacity: 1;
    }
    80% {
        opacity: 0;
        transform: translateX(-50%) translateY(16px);
    }
    100% {
        opacity: 0;
    }
}

