:root {
    --bg: #0a0a0f;
    --surface: #111118;
    --surface2: #1a1a24;
    --border: rgba(255,255,255,0.07);
    --accent: #7c6af7;
    --accent2: #e8b4f8;
    --text: #e8e8f0;
    --muted: #6b6b80;
    --green: #4ade80;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Mono', monospace;
    overflow-x: hidden;
}



/* Noise overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9000;
    opacity: 0.4;
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 4rem;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    background: rgba(10,10,15,0.8);
}

.nav-logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}

    .nav-logo span {
        color: var(--accent);
    }

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

    .nav-links a {
        color: var(--muted);
        text-decoration: none;
        font-size: 0.75rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        transition: color 0.3s;
    }

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

.nav-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--green);
    animation: pulse 2s infinite;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 8px;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 201;
}

.nav-toggle .bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    margin: 3px 0;
    transition: transform 0.25s, opacity 0.25s;
}

@media (max-width: 1024px) {
    .nav-toggle { display: inline-flex; }
    .nav-dot { display: none; }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 4rem 6rem;
    position: relative;
    overflow: hidden;
    padding-right: max(4rem, calc(320px + 8rem));
}

.hero-tag {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .hero-tag::before {
        content: '';
        display: block;
        width: 40px;
        height: 1px;
        background: var(--accent);
    }

.hero-name {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

    .hero-name em {
        font-family: 'Fraunces', serif;
        font-style: italic;
        font-weight: 300;
        color: var(--accent2);
    }

.hero-sub {
    font-size: 0.9rem;
    color: var(--muted);
    max-width: 500px;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.hero-actions {
    position: relative;
    z-index: 35;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 600px;
}

/* HERO: top photo with feathered edges that blend to background */
.hero-photo {
    position: absolute;
    top: 7rem;
    right: 4rem;
    width: 320px;
    height: 320px;
    border-radius: 18px;
    overflow: hidden;
    z-index: 20;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6), inset 0 0 60px rgba(124,106,247,0.04);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.06));
    -webkit-mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
    mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
    transition: transform 0.35s ease;
    transform-origin: center;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.6s cubic-bezier(.2,.9,.2,1);
}

.hero-photo:hover { transform: translateY(-6px); }
.hero-photo:hover img { transform: scale(1.06); }

.hero-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(10,10,15,0.0) 30%, rgba(10,10,15,0.65) 80%);
    mix-blend-mode: normal;
}

/* HERO TAG / NAME adjustments to avoid overlap with photo on wide screens */
.hero-tag, .hero-name, .hero-sub {
    position: relative;
    z-index: 30;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}

    .btn-primary:hover {
        background: transparent;
        color: var(--accent);
        box-shadow: 0 0 30px rgba(124,106,247,0.3);
    }

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

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

.hero-scroll {
    position: absolute;
    right: 4rem;
    bottom: 6rem;
    writing-mode: vertical-rl;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--muted);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .hero-scroll::after {
        content: '';
        width: 1px;
        height: 80px;
        background: linear-gradient(var(--muted), transparent);
    }

/* SECTION BASE */
section {
    padding: 8rem 4rem;
    position: relative;
    z-index: 1;
}

.section-label {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .section-label::before {
        content: '';
        width: 24px;
        height: 1px;
        background: var(--accent);
    }

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 4rem;
    max-width: 600px;
    line-height: 1.1;
}

/* ABOUT */
#about {
    background: var(--surface);
}

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

.about-text {
    font-size: 0.95rem;
    line-height: 2;
    color: var(--muted);
}

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

    .about-text strong {
        color: var(--text);
        font-weight: 500;
    }

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5px;
    background: var(--border);
}

.stat-box {
    background: var(--surface2);
    padding: 2rem;
    transition: background 0.3s;
}

    .stat-box:hover {
        background: var(--bg);
    }

.stat-num {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.skills-list {
    margin-top: 3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.4rem 1rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    transition: all 0.3s;
}

    .skill-tag:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

/* PROJECTS */
#projects {
    background: var(--bg);
}

#projects .section-label {
    color: var(--accent);
    z-index: 10;
    position: relative;
}

#projects .section-title {
    color: var(--text);
    z-index: 10;
    position: relative;
    margin-bottom: 4rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5px;
    background: var(--border);
}

.project-card {
    background: var(--surface);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: background 0.4s;

}

    .project-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, var(--accent), var(--accent2));
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.4s ease;
    }

    .project-card:hover {
        background: var(--surface2);
    }

        .project-card:hover::before {
            transform: scaleX(1);
        }

.project-num {
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
    font-family: 'DM Mono', monospace;
}

.project-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.project-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.9;
    margin-bottom: 2rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 2rem;
}

.project-tag {
    padding: 0.25rem 0.75rem;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: gap 0.3s;
}

    .project-link:hover {
        gap: 0.8rem;
    }

    .project-link svg {
        width: 14px;
        height: 14px;
    }

/* CONTACT */
#contact {
    background: var(--surface);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

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

        .contact-link:hover .link-arrow {
            transform: translateX(6px);
        }

.link-arrow {
    transition: transform 0.3s;
    color: var(--accent);
}

/* FOOTER */
footer {
    padding: 2rem 4rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}

/* EXPERIENCE */
#experience {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5px;
    background: var(--border);
}

.timeline-item {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    padding: 2.5rem;
    background: var(--surface);
    transition: background 0.4s;
}

    .timeline-item:hover {
        background: var(--surface2);
    }

.timeline-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.timeline-date {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
}

.timeline-place {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.6;
}

.timeline-role {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.2rem;
    line-height: 1.2;
}

.timeline-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

    .timeline-list li {
        position: relative;
        padding-left: 1.2rem;
        font-size: 0.82rem;
        color: var(--muted);
        line-height: 1.8;
    }

        .timeline-list li::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0.85em;
            width: 6px;
            height: 1px;
            background: var(--accent);
        }

@media (max-width: 1024px) {
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.6rem;
    }
}

/* ANIMATIONS */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

    .reveal.visible {
        opacity: 1;
        transform: none;
    }

/* RESPONSIVE */

/* Mobile */
@media (max-width: 1024px) {
    html { font-size: 15px; }
    nav { padding: 1.2rem 1.5rem; }
    .nav-toggle { display: inline-flex; }
    .nav-links { 
        display: none;
    }
    .nav-links.open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10,10,15,0.98);
        flex-direction: column;
        gap: 0;
        padding: 1rem 1.5rem;
        border-top: 1px solid var(--border);
        z-index: 200;
        width: 100%;
    }
    .nav-links.open li { 
        padding: 0.8rem 0; 
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .nav-links.open li:last-child {
        border-bottom: none;
    }
    .nav-links.open a { 
        color: var(--text); 
        font-size: 0.9rem; 
        letter-spacing: 0.06em; 
        text-transform: none;
        display: block;
        padding: 0.5rem 0;
    }

    section { padding: 5rem 1.5rem; }
    .hero { padding: 0 1.5rem 5rem; padding-right: 1.5rem; }
    .hero-scroll { display: none; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 3rem; }

    /* Reduce large orbital decorations on small screens */

    /* Stack projects into single column where necessary */
    .projects-grid { grid-template-columns: 1fr; }

    /* Make interactive areas larger */
    .project-card { padding: 1.6rem; }

    /* hero-photo smaller / moved to top-right on tablet */
    .hero-photo {
        right: 1.5rem;
        top: 1.4rem;
        width: 180px;
        height: 180px;
        border-radius: 14px;
        -webkit-mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 65%, rgba(0,0,0,0) 100%);
        mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 65%, rgba(0,0,0,0) 100%);
    }

    .hero-actions { max-width: 100%; }
}

/* Small screens */
@media (max-width: 768px) {
    .hero-photo {
        display: block !important;
        position: absolute; /* önemli */
        left: 50%;
        top: 12rem;
        transform: translateX(-50%);
        width: 270px;
        height: 270px;
        border-radius: 12px;
        -webkit-mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
        mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
    }

    .hero-sub {
        max-width: 100%;
    }

    .hero-actions {
        max-width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1200px) {
    .hero-photo {
        display: block !important;
        position: absolute; /* önemli */
        left: auto;
        right: 3rem;
        top: 7rem;
        transform: none;
        width: 260px;
        height: 260px;
        border-radius: 12px;
        -webkit-mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
        mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
    }

    .hero {
        padding-right: calc(260px + 6rem);
    }

    .hero-sub {
        max-width: 100%;
    }

    .hero-actions {
        max-width: 100%;
    }
}
@media (max-width: 480px) {
    html { font-size: 14px; }
    .hero-name { font-size: clamp(2.2rem, 10vw, 4rem); }
    .hero-sub { max-width: 100%; font-size: 0.9rem; }
    .btn { padding: 0.8rem 1.2rem; font-size: 0.85rem; }
    .hero-photo {
        display: block !important;
        position: absolute; /* önemli */
        left: 50%;
        top: 8rem;
        transform: translateX(-50%);
        width: 200px;
        height: 200px;
        border-radius: 12px;
        -webkit-mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
        mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
    }

    .hero-sub {
        max-width: 100%;
    }

    .hero-actions {
        max-width: 100%;
    }
}

/* Large screens (desktop comfortable) */
@media (min-width: 1200px) {
    html { font-size: 17px; }
    .hero-name { font-size: clamp(4rem, 6vw, 8rem); }
    section { padding: 10rem 6rem; }
    .projects-grid { gap: 0rem; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
    .hero-sub { max-width: 500px; }
    .hero-actions { max-width: 600px; }
    .hero { padding-right: max(6rem, calc(380px + 12rem)); }

    /* for large desktops, push photo a little further out to feel airy */
    .hero-photo {
        right: 6rem;
        top: 8rem;
        width: 380px;
        height: 380px;
        border-radius: 20px;
        -webkit-mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 58%, rgba(0,0,0,0) 100%);
        mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 58%, rgba(0,0,0,0) 100%);
    }
}

/* Ultra wide / 4K screens */
@media (min-width: 2560px) {
    html { font-size: 20px; }
    nav { padding: 2.5rem 10rem; }
    section { padding: 12rem 12rem; }
    .hero { padding-bottom: 8rem; padding-right: max(12rem, calc(560px + 20rem)); }
    .hero-name { font-size: clamp(6rem, 5vw, 10rem); }
    .hero-sub { font-size: 1.1rem; max-width: 1100px; }
    .hero-actions { max-width: 700px; }
    .projects-grid { grid-template-columns: repeat(3, 1fr); gap: 0rem; }
    footer { padding: 3rem 10rem; }

    /* larger hero-photo scale for 4K */
    .hero-photo {
        right: 12rem;
        top: 10rem;
        width: 560px;
        height: 560px;
        border-radius: 28px;
        -webkit-mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 55%, rgba(0,0,0,0) 100%);
        mask-image: radial-gradient(circle at 40% 30%, rgba(0,0,0,1) 55%, rgba(0,0,0,0) 100%);
    }
}

/* Hide custom cursor if class added by JS */
body.no-cursor .cursor,
body.no-cursor .cursor-follower {
    display: none !important;
}

/* 3D BACKGROUND (wwwroot/js/bg3d.js) */
#bg3d {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.2s linear;
}

/* Let the 3D scene show through the sections */
#about,
#contact {
    background: rgba(17,17,24,0.55);
}

#experience,
#projects {
    background: rgba(10,10,15,0.35);
}

footer {
    position: relative;
    z-index: 1;
    background: rgba(10,10,15,0.6);
}

/* Keep hero text readable over the network lines */
.hero-sub {
    text-shadow: 0 0 14px var(--bg), 0 0 4px var(--bg);
}
