/* ============================================================
   Bedri Berkin Tan — GitHub Pages Portfolio
   ============================================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0a192f;
    --secondary: #112240;
    --accent: #64ffda;
    --accent-alt: #4fc3f7;
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --text-muted: #495670;
    --white: #e6f1ff;
    --card-bg: #112240;
    --card-border: #1d3a5f;
    --nav-height: 70px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
    --radius: 8px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-alt);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Container --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Section Shared --- */
.section {
    padding: 100px 0;
}

.section-alt {
    background-color: var(--secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}

.section-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-alt));
    margin: 12px auto 0;
    border-radius: 2px;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(100, 255, 218, 0.08);
    z-index: 1000;
    transition: all var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent) !important;
    letter-spacing: 2px;
    border: 2px solid var(--accent);
    padding: 6px 12px;
    border-radius: 4px;
    transition: all var(--transition);
}

.nav-logo:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
    transition: color var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 28px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 0 24px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(100, 255, 218, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(79, 195, 247, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 60% 80%, rgba(100, 255, 218, 0.03) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.hero-text {
    max-width: 700px;
}

.hero-greeting {
    font-size: 1rem;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.hero-title {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    min-height: 2.5rem;
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent);
    font-weight: 300;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-location {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.hero-location i {
    color: var(--accent);
    margin-right: 8px;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    font-family: inherit;
}

.btn i {
    font-size: 0.9rem;
}

.btn-primary {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100, 255, 218, 0.15);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-alt);
    border-color: var(--accent-alt);
}

.btn-secondary:hover {
    background: rgba(79, 195, 247, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.15);
}

.hero-socials {
    display: flex;
    gap: 20px;
}

.hero-socials a {
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: all var(--transition);
}

.hero-socials a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* --- Timeline (Experience) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-alt), transparent);
}

.timeline-item {
    position: relative;
    padding-left: 56px;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 10px;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--accent);
    z-index: 2;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.timeline-content {
    background: var(--card-bg);
    padding: 24px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    transition: all var(--transition);
}

.timeline-content:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.timeline-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.timeline-content h4 {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--accent-alt);
    margin-bottom: 12px;
}

.timeline-content ul {
    list-style: disc;
    padding-left: 20px;
}

.timeline-content li {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 6px;
}

.timeline-content li:last-child {
    margin-bottom: 0;
}

/* --- Education --- */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    max-width: 900px;
    margin: 0 auto;
}

.edu-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    gap: 20px;
    transition: all var(--transition);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.edu-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.edu-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 255, 218, 0.08);
    border-radius: 50%;
    color: var(--accent);
    font-size: 1.3rem;
}

.edu-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 2px;
}

.edu-body h4 {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--accent-alt);
    margin-bottom: 4px;
}

.edu-minor {
    font-size: 0.9rem;
    color: var(--accent);
    font-style: italic;
    margin-bottom: 6px;
}

.edu-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.edu-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.edu-courses {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.edu-courses span {
    font-size: 0.78rem;
    padding: 4px 12px;
    background: rgba(100, 255, 218, 0.06);
    border: 1px solid rgba(100, 255, 218, 0.15);
    border-radius: 20px;
    color: var(--text-secondary);
}

/* --- Skills --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.skill-category:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.skill-category h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    color: var(--accent);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tags span {
    font-size: 0.85rem;
    padding: 6px 16px;
    background: rgba(100, 255, 218, 0.06);
    border: 1px solid rgba(100, 255, 218, 0.15);
    border-radius: 20px;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.skill-tags span:hover {
    background: rgba(100, 255, 218, 0.12);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* --- Projects --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    max-width: 1000px;
    margin: 0 auto;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.project-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 255, 218, 0.08);
    border-radius: 12px;
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.project-date {
    font-size: 0.82rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.project-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Contact --- */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 14px 28px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition);
    min-width: 340px;
    text-align: left;
}

.contact-item i {
    width: 20px;
    color: var(--accent);
    font-size: 1.1rem;
}

.contact-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateX(6px);
    color: var(--accent);
}

/* --- Footer --- */
.footer {
    padding: 32px 0;
    background: var(--secondary);
    border-top: 1px solid var(--card-border);
    text-align: center;
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.footer p i {
    color: var(--accent);
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-socials a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: all var(--transition);
}

.footer-socials a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: var(--secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        transition: right var(--transition);
        border-left: 1px solid var(--card-border);
        z-index: 999;
    }

    .nav-links.open {
        right: 0;
    }

    .hamburger {
        display: flex;
        z-index: 1000;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
        width: 100%;
    }

    .section {
        padding: 64px 0;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .timeline-content {
        padding: 18px 20px;
    }

    .education-grid,
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .edu-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-item {
        min-width: unset;
        width: 100%;
    }

    .contact-links {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 0 16px;
    }

    .container {
        padding: 0 16px;
    }

    .hero-name {
        font-size: 2rem;
    }

    .timeline-item {
        padding-left: 44px;
    }

    .timeline-dot {
        left: 6px;
        width: 14px;
        height: 14px;
    }

    .timeline::before {
        left: 14px;
    }
}