/* style.css - Dark/Light Mode Portfolio with 3D Background */

:root {
    /* Dark Mode Variables */
    --bg-dark: transparent; 
    --bg-darker: rgba(6, 9, 15, 0.4);
    --card-bg: rgba(20, 28, 45, 0.4);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.4);
    --nav-bg: rgba(11, 15, 25, 0.5);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

body.light-mode {
    /* Light Mode Variables - Warm Mocha/Caramel Theme */
    --bg-darker: rgba(188, 143, 112, 0.8);
    --card-bg: rgba(255, 255, 255, 0.25);
    --card-border: rgba(139, 90, 43, 0.4);
    --text-primary: #2e1503;
    --text-secondary: #5c3a21;
    --accent: #ff6d00;
    --accent-glow: rgba(255, 109, 0, 0.4);
    --nav-bg: rgba(188, 143, 112, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cdefs%3E%3Cfilter id='glow'%3E%3CfeDropShadow dx='0' dy='0' stdDeviation='1.5' flood-color='%2338bdf8' flood-opacity='1'/%3E%3C/filter%3E%3C/defs%3E%3Cg transform='translate(6, 6) rotate(-15 12 12)' filter='url(%23glow)'%3E%3Cpath d='M10 2v7M10 2a2 2 0 0 1 4 0v7M14 9a2 2 0 0 1 4 0v4M18 13a2 2 0 0 1 4 0v3a8 8 0 0 1-8 8h-2c-4.4 0-8-3.6-8-8v-6a2 2 0 0 1 4 0v3' fill='rgba(6,9,15,0.85)' stroke='%2338bdf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E") 14 6, auto !important;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0b0f19; /* Fallback */
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: color 0.5s ease;
}

body.light-mode {
    background-color: #bc8f70; /* Fallback */
}

/* 3D Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none; /* Let clicks pass through */
}

#electric-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998; /* Below Lightbox but above most UI */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.highlight {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
}

.text-accent {
    color: var(--accent);
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}

.theme-btn:hover {
    transform: rotate(20deg);
    color: var(--accent);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    position: relative;
    background: transparent; /* Changed from solid image to let canvas show */
}

.hero-content {
    max-width: 800px;
    z-index: 1;
    animation: fadeIn 1s ease-out;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.hero-content h2 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
    cursor: pointer;
}

.primary-btn {
    background-color: var(--accent);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 0 15px var(--accent-glow);
}

.primary-btn:hover {
    background-color: var(--text-primary);
    color: var(--bg-darker);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
    margin-left: 1rem;
}

.secondary-btn:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* Sections General */
section {
    padding: 6rem 5%;
    position: relative;
    z-index: 2; /* Content stays above canvas */
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
}

.underline {
    height: 3px;
    width: 60px;
    background-color: var(--accent);
    margin: 0.5rem auto 0;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    margin-top: -1.5rem;
}

/* About Section */
#about, #certificates {
    background-color: var(--bg-darker);
}

.about-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.personal-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
    font-style: italic;
    color: var(--text-secondary);
}

.turkish-flag {
    width: 30px;
    border-radius: 2px;
    opacity: 0.9;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 15px var(--accent-glow);
    border-color: rgba(56, 189, 248, 0.4);
}

.skill-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.progress-bar {
    background-color: rgba(128, 128, 128, 0.2);
    height: 8px;
    border-radius: 4px;
    position: relative;
}

.progress {
    background-color: var(--accent);
    height: 100%;
    border-radius: 4px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.progress span {
    position: absolute;
    right: 0;
    top: -22px;
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Projects Section */
#projects {
    background-color: transparent;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.project-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--card-border);
    transition: transform 0.5s ease;
    position: relative;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
    background: var(--card-bg);
    position: relative;
    z-index: 2;
}

.project-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.view-btn:hover {
    gap: 0.8rem;
}

/* Contact Section */
#contact {
    text-align: center;
    background-color: var(--bg-darker);
    backdrop-filter: blur(8px);
}

#contact p {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: rgba(128, 128, 128, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* Footer */
footer {
    background-color: var(--bg-darker);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    backdrop-filter: blur(8px);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-mode .modal-overlay {
    background: rgba(255, 255, 255, 0.5);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Custom Vertical Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 0 20px 20px 0;
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--accent-glow);
}
.modal-content::-webkit-scrollbar-thumb:hover {
    background: #fff;
    box-shadow: 0 0 15px var(--accent-glow);
}

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

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(128,128,128,0.2);
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    background: var(--accent);
    color: #fff;
    transform: rotate(90deg);
}

#modal-body .modal-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

#modal-body .modal-text-content {
    padding: 3rem;
    color: var(--text-primary);
}

#modal-body h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

#modal-body h4 {
    font-size: 1.2rem;
    color: var(--accent);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

#modal-body ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

#modal-body ul li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

#modal-body ul li i {
    width: 25px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: block; }
    .hero-content h1 { font-size: 2.5rem; }
    .about-container { padding: 2rem; }
    #modal-body .modal-text-content { padding: 2rem; }
}

/* --- FAT CAT LOGO ANIMATION --- */
#fat-cat-container:hover .cat-paw {
    animation: cat-swat 0.15s infinite alternate;
}
#fat-cat-container:hover .cat-claws {
    opacity: 1 !important;
}
.cat-tail {
    transform-origin: 85px 75px;
    animation: cat-idle-tail 6s infinite;
}
#fat-cat-container:hover .cat-tail {
    animation: cat-tail-wag 0.5s infinite alternate;
}

@keyframes cat-swat {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(70deg) translateY(-5px); }
}

@keyframes cat-tail-wag {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-10deg); }
}

@keyframes cat-idle-tail {
    0%, 80%, 100% { transform: rotate(0deg); }
    85% { transform: rotate(-10deg); }
    90% { transform: rotate(5deg); }
    95% { transform: rotate(-5deg); }
}

@keyframes bounce-x {
    0% { transform: translateX(0); }
    100% { transform: translateX(-5px); }
}
/* BLIZZARD STYLE FRAMES - OUTWARD (WARCRAFT STYLE) */
.skill-card, .project-card, .cert-card {
    position: relative;
    border: 1px solid var(--card-border) !important;
    box-shadow: none !important;
}

/* Thin Outward Frame Line */
.skill-card::before, .project-card::before, .cert-card::before {
    content: '';
    position: absolute;
    top: -6px; left: -6px; right: -6px; bottom: -6px;
    border: 1px solid var(--accent);
    opacity: 0.7;
    border-radius: 18px; /* Encasing the 15px card */
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); /* Outer shadow on the frame itself */
}

/* Warcraft style Protruding Corner Details */
.skill-card::after, .project-card::after, .cert-card::after {
    content: '';
    position: absolute;
    top: -6px; left: -6px; right: -6px; bottom: -6px;
    border-radius: 18px;
    background: 
        radial-gradient(circle at 0px 0px, var(--accent) 3px, transparent 4px),
        radial-gradient(circle at 100% 0px, var(--accent) 3px, transparent 4px),
        radial-gradient(circle at 0px 100%, var(--accent) 3px, transparent 4px),
        radial-gradient(circle at 100% 100%, var(--accent) 3px, transparent 4px);
    pointer-events: none;
    z-index: 11;
}

/* Hover Effect */
.skill-card:hover, .project-card:hover, .cert-card:hover {
    transform: translateY(-5px);
}

.skill-card:hover::before, .project-card:hover::before, .cert-card:hover::before {
    opacity: 1;
    border-color: var(--accent-glow);
    box-shadow: 0 0 15px var(--accent-glow), inset 0 0 8px var(--accent-glow);
}
/* --- POPUP GALLERY BLIZZARD THEME --- */
.modal-gallery-wrapper {
    position: relative;
    margin: 20px 0;
    padding: 10px 0;
    /* subtle fade on edges to indicate scrolling */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.modal-gallery {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 15px; /* space for scrollbar */
    scroll-snap-type: x mandatory;
    padding-left: 5%; /* For mask alignment */
    padding-right: 5%;
}

/* Custom Scrollbar for Gallery */
.modal-gallery::-webkit-scrollbar {
    height: 8px;
}
.modal-gallery::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}
.modal-gallery::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--accent-glow);
}
.modal-gallery::-webkit-scrollbar-thumb:hover {
    background: #fff;
}

/* Individual Image Blizzard Frame */
.gallery-img-wrapper {
    position: relative;
    scroll-snap-align: center;
    flex-shrink: 0;
    height: 160px;
    width: 240px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-top: 6px;
    margin-bottom: 6px;
    background: var(--card-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Outward Thin Frame */
.gallery-img-wrapper::before {
    content: '';
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    border: 1px solid var(--accent);
    opacity: 0.5;
    border-radius: 14px;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Corner Dots */
.gallery-img-wrapper::after {
    content: '';
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    border-radius: 14px;
    background: 
        radial-gradient(circle at 0px 0px, var(--accent) 2px, transparent 3px),
        radial-gradient(circle at 100% 0px, var(--accent) 2px, transparent 3px),
        radial-gradient(circle at 0px 100%, var(--accent) 2px, transparent 3px),
        radial-gradient(circle at 100% 100%, var(--accent) 2px, transparent 3px);
    pointer-events: none;
    z-index: 3;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 11px;
    cursor: zoom-in;
    transition: transform 0.4s ease;
}

.gallery-img-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.gallery-img-wrapper:hover::before {
    opacity: 1;
    border-color: var(--accent-glow);
    box-shadow: 0 0 15px var(--accent-glow), inset 0 0 8px var(--accent-glow);
}

.gallery-hint {
    font-size: 0.85rem; 
    color: var(--text-secondary); 
    margin-bottom: 20px;
    text-align: center;
}
.gallery-hint i {
    color: var(--accent);
    margin-right: 5px;
    animation: moveLeftRight 2s infinite;
}

@keyframes moveLeftRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}
