/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Theme Colors (Default) */
    --primary-color: #dc2626;
    --primary-light: #ef4444;
    --primary-dark: #b91c1c;
    --accent-color: #fca5a5;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1f1f1f;
    --card-bg: #171717;
    --border-color: #262626;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Colors */
[data-theme="light"] {
    --primary-color: #dc2626;
    --primary-light: #ef4444;
    --primary-dark: #b91c1c;
    --accent-color: #fca5a5;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    cursor: none;
    transition: background-color 0.3s ease;
}

/* Custom Cursor */
.cursor,
.cursor-follower {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
}

.cursor {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    opacity: 0.5;
}

.cursor.expand {
    width: 50px;
    height: 50px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
}

.cursor-follower.expand {
    width: 70px;
    height: 70px;
    opacity: 0.3;
}

/* Fixed Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 50px;
    background: transparent;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* Theme Switcher */
.theme-switcher {
    width: 50px;
    height: 26px;
    background: var(--bg-tertiary);
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.theme-switcher:hover {
    border-color: var(--primary-color);
}

.theme-switcher-toggle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: white;
}

[data-theme="light"] .theme-switcher-toggle {
    left: 26px;
}

/* Page Navigation Dots */
.page-navigation {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.nav-dot::before {
    content: attr(title);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-tertiary);
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.nav-dot:hover::before {
    opacity: 1;
}

.nav-dot:hover {
    background: var(--primary-color);
    transform: scale(1.3);
}

.nav-dot.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 10px;
}

/* Fullpage Container */
.fullpage-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.fullpage-container::-webkit-scrollbar {
    display: none;
}

.page-section {
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 50px;
}

.section-content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Section Headers */
.section-header {
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.section-number {
    font-size: 5rem;
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.2;
    line-height: 1;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
}

/* Buttons */
.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 44px; /* Touch target size */
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn i {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Hero Section */
#home {
    background: var(--bg-primary);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.highlight {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 500px;
}

.floating-card {
    position: absolute;
    width: 180px;
    height: 180px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.card-2 {
    bottom: 50px;
    left: 0;
    animation-delay: 2s;
}

.card-3 {
    bottom: 50px;
    right: 0;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* About Section */
#about {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 80px;
    align-items: start;
}

.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.profile-image {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: white;
    margin: 0 auto 30px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 25px;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.highlight-item {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.highlight-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.highlight-item h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.highlight-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Skills Section */
#skills {
    background: var(--bg-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.skill-item {
    text-align: center;
    padding: 40px 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    transition: var(--transition);
    position: relative;
}

.skill-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(220, 38, 38, 0.2);
}

.skill-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.skill-item h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.skill-level {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.level-bar {
    height: 100%;
    background: var(--primary-color);
    width: var(--level);
    border-radius: 10px;
    transition: width 1s ease;
}

.skill-percent {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Projects Section */
#projects {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.project-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 35px;
    transition: var(--transition);
    position: relative;
}

.project-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 50px rgba(220, 38, 38, 0.2);
}

.project-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.1;
}

.project-image {
    width: 100px;
    height: 100px;
    background: var(--bg-tertiary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.project-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.project-tech span {
    padding: 5px 15px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.project-link:hover {
    gap: 15px;
}

/* Contact Section */
#contact {
    background: var(--bg-primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-left h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.contact-left > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.contact-detail {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-detail i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.contact-detail h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.contact-detail p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.3rem;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

/* Contact Form */
.contact-form {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

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

.footer-text {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

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

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   ======================================== */

/* Tablet Landscape - 1024px and below */
@media (max-width: 1024px) {
    .navbar {
        padding: 20px 40px;
    }

    .page-section {
        padding: 100px 40px 60px;
        height: auto;
        min-height: 100vh;
    }

    .section-number {
        font-size: 4rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .section-header {
        gap: 20px;
        margin-bottom: 40px;
    }

    /* Hero adjustments */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-visual {
        display: none;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    /* About adjustments */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .profile-card {
        max-width: 500px;
        margin: 0 auto;
    }

    /* Skills adjustments */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    /* Projects adjustments */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* Contact adjustments */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Tablet Portrait and Large Mobile - 768px and below */
@media (max-width: 768px) {
    /* Show default cursor on mobile/tablet */
    body {
        cursor: auto !important;
        overflow: visible;
    }

    .cursor,
    .cursor-follower {
        display: none !important;
    }

    /* Navigation */
    .navbar {
        padding: 15px 20px;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
    }

    .nav-brand {
        font-size: 1.2rem;
    }

    /* Hide or reposition page navigation dots */
    .page-navigation {
        right: 15px;
        gap: 15px;
    }

    .nav-dot {
        width: 10px;
        height: 10px;
    }

    .nav-dot.active {
        width: 10px;
        height: 24px;
    }

    .nav-dot::before {
        display: none; /* Hide tooltips on mobile */
    }

    /* Sections */
    .page-section {
        padding: 100px 20px 40px;
        scroll-snap-align: none; /* Disable snap on mobile */
    }

    .fullpage-container {
        scroll-snap-type: none; /* Disable snap scrolling */
        overflow-y: auto;
    }

    .section-content {
        max-width: 100%;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 30px;
    }

    .section-number {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    /* Hero Section Mobile */
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-label {
        font-size: 0.8rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

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

    /* About Section Mobile */
    .profile-card {
        padding: 30px 20px;
    }

    .profile-image {
        width: 150px;
        height: 150px;
        font-size: 4rem;
    }

    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .stat h3 {
        font-size: 1.5rem;
    }

    .stat p {
        font-size: 0.75rem;
    }

    .about-text {
        font-size: 1rem;
    }

    .highlight-item {
        padding: 15px;
        gap: 15px;
    }

    .highlight-item i {
        font-size: 1.5rem;
        flex-shrink: 0;
    }

    .highlight-item h4 {
        font-size: 0.95rem;
    }

    .highlight-item p {
        font-size: 0.85rem;
    }

    /* Skills Section Mobile */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .skill-item {
        padding: 30px 20px;
    }

    .skill-icon {
        font-size: 3rem;
    }

    .skill-item h3 {
        font-size: 1.1rem;
    }

    /* Projects Section Mobile */
    .projects-grid {
        gap: 20px;
    }

    .project-item {
        padding: 25px 20px;
    }

    .project-number {
        font-size: 3rem;
        top: 15px;
        right: 15px;
    }

    .project-image {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
        margin-bottom: 20px;
    }

    .project-info h3 {
        font-size: 1.2rem;
    }

    .project-info p {
        font-size: 0.95rem;
    }

    .project-tech span {
        font-size: 0.75rem;
        padding: 4px 12px;
    }

    /* Contact Section Mobile */
    .contact-left h3 {
        font-size: 1.5rem;
    }

    .contact-left > p {
        font-size: 1rem;
    }

    .contact-detail {
        gap: 15px;
    }

    .contact-detail i {
        font-size: 1.2rem;
    }

    .contact-detail h4 {
        font-size: 0.9rem;
    }

    .contact-detail p {
        font-size: 0.85rem;
    }

    .social-links {
        justify-content: center;
    }

    .social-link {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    /* Form Mobile */
    .contact-form {
        padding: 25px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-group textarea {
        min-height: 100px;
    }

    /* Button adjustments */
    .btn {
        padding: 12px 25px;
        font-size: 0.95rem;
    }

    /* Footer */
    .footer-text {
        margin-top: 40px;
        padding-top: 30px;
    }

    .footer-text p {
        font-size: 0.8rem;
    }
}

/* Small Mobile - 480px and below */
@media (max-width: 480px) {
    .navbar {
        padding: 12px 15px;
    }

    .nav-brand {
        font-size: 1rem;
    }

    .theme-switcher {
        width: 45px;
        height: 24px;
    }

    .theme-switcher-toggle {
        width: 16px;
        height: 16px;
    }

    [data-theme="light"] .theme-switcher-toggle {
        left: 23px;
    }

    .page-section {
        padding: 90px 15px 30px;
    }

    .section-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .profile-image {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }

    .profile-stats {
        gap: 10px;
    }

    .stat h3 {
        font-size: 1.2rem;
    }

    .stat p {
        font-size: 0.7rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .project-tech {
        gap: 8px;
    }

    .contact-form {
        padding: 20px 15px;
    }
}

/* Extra Small Mobile - 360px and below */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .profile-stats {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .page-navigation {
        right: 10px;
        gap: 12px;
    }
}

/* Landscape orientation fixes for mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .page-section {
        height: auto;
        min-height: auto;
        padding: 80px 20px 40px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-header {
        margin-bottom: 20px;
    }
}
