/* ==========================================================================
   DESIGN SYSTEM - BLACK & WHITE PORTFOLIO
   ========================================================================== */

/* Color variables for Light & Dark Modes */
:root {
    /* Fonts */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Light Theme Settings (Default when .light-theme is applied) */
    --bg-primary: #ffffff;
    --bg-secondary: #f9f9f9;
    --bg-tertiary: #f0f0f0;
    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #888888;
    --border-color: #e0e0e0;
    --border-hover: #888888;
    --border-focus: #111111;
    --accent: #111111;
    --accent-inverse: #ffffff;
    --accent-hover: #333333;
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(17, 17, 17, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.05);
    
    --transition-fast: 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Dark Theme Settings (Applied by default via class or media query) */
.dark-theme {
    --bg-primary: #07070a;
    --bg-secondary: #0f0f15;
    --bg-tertiary: #161620;
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3b0;
    --text-muted: #666677;
    --border-color: #222230;
    --border-hover: #3b3b52;
    --border-focus: #00d2ff;
    --accent: #00d2ff;
    --accent-inverse: #050505;
    --accent-hover: #4de1ff;
    
    --glass-bg: rgba(7, 7, 10, 0.85);
    --glass-border: rgba(0, 210, 255, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 210, 255, 0.15);
    --shadow-md: 0 10px 30px rgba(0, 210, 255, 0.25);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Glitch Animation Keyframes */
@keyframes glitch-anim {
    0% { clip-path: inset(10% 0 80% 0); transform: translate(-2px, 2px); }
    20% { clip-path: inset(40% 0 20% 0); transform: translate(2px, -2px); }
    40% { clip-path: inset(80% 0 5% 0); transform: translate(-2px, 1px); }
    60% { clip-path: inset(20% 0 60% 0); transform: translate(2px, 2px); }
    80% { clip-path: inset(60% 0 10% 0); transform: translate(-2px, -1px); }
    100% { clip-path: inset(30% 0 50% 0); transform: translate(2px, 1px); }
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

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

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

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

button, input, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

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

/* ==========================================================================
   LAYOUT & UTILITIES
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 8rem 0;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 210, 255, 0.12), transparent 45%),
        radial-gradient(circle at 85% 20%, rgba(176, 38, 255, 0.12), transparent 45%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px;
    pointer-events: none;
    z-index: -1;
    transition: background-image var(--transition-normal);
}

/* Headers */
.section-header {
    margin-bottom: 4rem;
    text-align: left;
}

.section-subtitle {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--accent);
    transition: background-color var(--transition-normal);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: linear-gradient(45deg, var(--accent), #b026ff);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #b026ff, var(--accent));
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(176, 38, 255, 0.6);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--accent);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.1);
}

.btn-secondary:hover {
    background-color: rgba(0, 210, 255, 0.1);
    border-color: var(--accent);
    color: #00d2ff;
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.3);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

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

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0.1em;
}

.logo span {
    border: 2px solid var(--text-primary);
    padding: 0.1rem 0.4rem;
    margin-right: 0.1rem;
    font-weight: 800;
}

/* Glitch Effect on Hover for Logo */
.logo {
    position: relative;
}
.logo:hover {
    animation: glitch-anim 0.3s infinite;
    color: var(--accent);
    text-shadow: 2px 0 red, -2px 0 cyan;
}

#nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2.2rem;
}

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1.5px;
    background-color: var(--text-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-normal);
}

.nav-link:hover::after, .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

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

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

#theme-toggle:hover {
    border-color: var(--accent);
    background-color: var(--bg-secondary);
}

#theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-normal);
}

/* Language Toggle */
#lang-toggle {
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
}

#lang-toggle:hover {
    border-color: var(--accent);
    background-color: var(--bg-secondary);
}

.dark-theme .sun-icon {
    display: block;
}

.dark-theme .moon-icon {
    display: none;
}

body:not(.dark-theme) .sun-icon {
    display: none;
}

body:not(.dark-theme) .moon-icon {
    display: block;
}

/* Mobile Menu Toggle */
#mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    cursor: pointer;
    z-index: 101;
}

#mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-fast);
}

#mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   HERO SECTION (ANASAYFA)
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border-color);
    gap: 2rem;
}

.hero-content {
    max-width: 600px;
    flex: 1;
}

.hero-tag {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    white-space: nowrap;
    background: linear-gradient(90deg, #00d2ff, #b026ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(0, 210, 255, 0.3));
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

#typewriter-text {
    font-weight: 600;
    color: var(--text-primary);
    border-right: 2px solid transparent;
}

.typewriter-cursor {
    animation: blink 0.8s infinite;
    font-weight: 200;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.scroll-down-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.scroll-down-indicator span {
    width: 24px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    position: relative;
}

.scroll-down-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background-color: var(--text-primary);
    border-radius: 2px;
    animation: scroll-wheel 1.6s infinite;
}

/* ==========================================================================
   ABOUT SECTION (HAKKIMDA)
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.9fr;
    gap: 4.5rem;
    align-items: center;
}

.about-visual {
    position: relative;
    border: 1px solid var(--border-color);
    padding: 2rem;
    background-color: var(--bg-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
}

.about-visual::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: 10px;
    bottom: 10px;
    border: 1px dashed var(--text-muted);
    opacity: 0.2;
    z-index: -1;
    pointer-events: none;
}

.visual-wrapper {
    width: 100%;
    max-width: 320px;
}

.abstract-svg {
    width: 100%;
    height: auto;
    color: var(--text-primary);
    transition: color var(--transition-normal);
}

/* Abstract animation keyframes for the B&W look */
.rot-circle-1 {
    transform-origin: 200px 200px;
    animation: rotate-clock 25s linear infinite;
}

.rot-circle-2 {
    transform-origin: 200px 200px;
    animation: rotate-counter 18s linear infinite;
}

.rot-rect {
    transform-origin: 200px 200px;
    animation: rotate-clock 15s linear infinite;
}

.about-greeting {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.stat-card {
    border: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    text-align: center;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

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

.about-actions {
    display: flex;
    gap: 1rem;
}

/* ==========================================================================
   SKILLS SECTION (YETENEKLER)
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.skill-category-card {
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 4px;
    transition: all var(--transition-normal);
}

.skill-category-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.category-icon {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.skill-category-card:hover .category-icon {
    background-color: var(--accent);
    color: var(--accent-inverse);
    border-color: var(--accent);
}

.category-icon svg {
    width: 22px;
    height: 22px;
}

.category-header h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
}

.category-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
}

.skill-name {
    color: var(--text-primary);
}

.skill-percentage {
    color: var(--text-muted);
}

.skill-bar-wrapper {
    width: 100%;
    height: 4px;
    background-color: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.skill-bar {
    height: 100%;
    width: 0%; /* Dynamic fill via JS script on scroll check */
    background-color: var(--accent);
    border-radius: 2px;
    transition: width 1.5s cubic-bezier(0.1, 1, 0.1, 1);
}

/* Skill Tags */
.skills-tags-section {
    margin-top: 5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 3.5rem;
    text-align: center;
}

.tags-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    max-width: 900px;
    margin: 0 auto;
}

.skill-tag {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--bg-secondary);
    transition: all var(--transition-fast);
    cursor: default;
}

.skill-tag:hover {
    background-color: var(--accent);
    color: var(--accent-inverse);
    border-color: var(--accent);
    transform: scale(1.05);
}

/* ==========================================================================
   EDUCATION & EXPERIENCE SECTION (EĞİTİM)
   ========================================================================== */
.timeline-container {
    position: relative;
    max-width: 950px;
    margin: 4rem auto 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 3rem 3rem;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 0.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    border: 3px solid var(--accent);
    transform: translateX(-50%);
    z-index: 2;
    transition: all var(--transition-fast);
}

.timeline-item:hover .timeline-dot {
    background-color: var(--accent);
    transform: translateX(-50%) scale(1.3);
}

.timeline-content {
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 4px;
    position: relative;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.timeline-item:hover .timeline-content {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.timeline-date {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-institution {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.85;
}

.timeline-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   CONTACT SECTION (İLETİŞİM)
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    gap: 5rem;
}

.info-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.info-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.info-details-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.info-detail-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.detail-icon {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.info-detail-item:hover .detail-icon {
    border-color: var(--accent);
    background-color: var(--accent);
    color: var(--accent-inverse);
}

.detail-icon svg {
    width: 20px;
    height: 20px;
}

.detail-content {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.detail-value {
    font-size: 1.05rem;
    font-weight: 500;
}

.detail-value:hover {
    color: var(--accent);
}

/* Social links icons hover inversion */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    color: var(--accent-inverse);
    background-color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px);
}

/* Form Styles */
.contact-form-wrapper {
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 3rem;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group label {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.85rem 1.2rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 4px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--glass-border);
}

/* Form validation states */
.form-group.invalid input, .form-group.invalid textarea {
    border-color: #ff3333;
}

.error-message {
    color: #ff3333;
    font-size: 0.8rem;
    font-weight: 500;
    display: none;
    margin-top: 0.35rem;
}

.form-group.invalid .error-message {
    display: block;
}

/* Submit Spinner */
.btn-spinner {
    width: 20px;
    height: 20px;
    animation: rotate-clock 1s linear infinite;
    display: none;
    margin-left: 0.5rem;
}

.btn-spinner .path {
    stroke: currentColor;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3.5rem 0;
}

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

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
}

.footer-logo span {
    border: 2px solid var(--text-primary);
    padding: 0.05rem 0.3rem;
    margin-right: 0.1rem;
    font-weight: 800;
}

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

.back-to-top {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.back-to-top:hover {
    color: var(--accent-inverse);
    background-color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px);
}

.back-to-top svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   MODALS (POPUP DIALOGS)
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    max-width: 480px;
    width: 90%;
    padding: 3rem 2.5rem;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-md);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.75rem;
    font-weight: 300;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-icon {
    width: 64px;
    height: 64px;
    border: 2px solid var(--text-primary);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.modal-icon svg {
    width: 32px;
    height: 32px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

/* ==========================================================================
   ANIMATIONS & SCROLL REVEALS
   ========================================================================== */
@keyframes blink {
    50% { opacity: 0; }
}

@keyframes scroll-wheel {
    0% { top: 6px; opacity: 1; }
    50% { top: 18px; opacity: 0; }
    100% { top: 6px; opacity: 1; }
}

@keyframes rotate-clock {
    100% { transform: rotate(360deg); }
}

@keyframes rotate-counter {
    100% { transform: rotate(-360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* Scroll reveal initial states */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE STYLES)
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }
    
    .about-grid {
        gap: 3rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    section {
        padding: 5rem 0;
    }
    
    .container {
        padding: 0 1.5rem;
    }

    /* Navigation Mobile Menu */
    #mobile-menu-toggle {
        display: flex;
    }
    
    #nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--bg-primary);
        border-left: 1px solid var(--border-color);
        z-index: 99;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right var(--transition-normal);
        box-shadow: var(--shadow-md);
    }
    
    #nav-menu.active {
        right: 0;
    }
    
    #nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }
    
    .nav-link {
        font-size: 1.15rem;
    }

    /* Hero */
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-visual {
        max-width: 320px;
        margin: 0 auto;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }

    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Timeline (Education) */
    .timeline-line {
        left: 2rem;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 4.5rem;
        padding-right: 0;
    }
    
    .timeline-item.left {
        left: 0;
        text-align: left;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-dot {
        left: 2rem;
    }
    
    .timeline-item:hover .timeline-dot {
        transform: translateX(-50%) scale(1.3);
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    
    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .about-actions {
        flex-direction: column;
    }
    
    .about-actions .btn {
        width: 100%;
    }
}
