/* ==========================================
   MAIN STYLESHEET - Portfolio Site
   ========================================== */

/* ==========================================
   CSS CUSTOM PROPERTIES (THEME VARIABLES)
   ========================================== */

:root {
    /* Light Mode Colors */
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --text-secondary: rgba(26, 26, 26, 0.7);
    --text-muted: rgba(26, 26, 26, 0.5);
    --accent: #2c2c2c;
    
    /* Glass Effects - Light Mode */
    --glass-card: rgba(0, 0, 0, 0.03);
    --glass-bg: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.1);
    
    /* UI Elements - Light Mode */
    --skill-bg: rgba(0, 0, 0, 0.05);
    --skill-border: rgba(0, 0, 0, 0.1);
    --code-bg: rgba(0, 0, 0, 0.05);
    --code-border: rgba(0, 0, 0, 0.15);
    --input-bg: rgba(0, 0, 0, 0.05);
    --input-border: rgba(0, 0, 0, 0.15);
    --response-bg: rgba(0, 0, 0, 0.03);
    --tab-bg: rgba(0, 0, 0, 0.03);
    --tab-active-bg: rgba(0, 0, 0, 0.08);
    --status-bg: rgba(0, 0, 0, 0.08);
    
    /* Alert Boxes - Light Mode */
    --info-bg: rgba(97, 175, 254, 0.1);
    --warning-bg: rgba(252, 161, 48, 0.1);
    --success-bg: rgba(73, 204, 144, 0.1);
    
    /* Alert Border Colors */
    --info-border: #61affe;
    --warning-border: #fca130;
    --success-border: #49cc90;
    --error-border: #f93e3e;
}

.dark-mode {
    /* Dark Mode Colors */
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --accent: rgba(255, 255, 255, 0.9);
    
    /* Glass Effects - Dark Mode */
    --glass-card: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* UI Elements - Dark Mode */
    --skill-bg: rgba(255, 255, 255, 0.08);
    --skill-border: rgba(255, 255, 255, 0.1);
    --code-bg: rgba(255, 255, 255, 0.1);
    --code-border: rgba(255, 255, 255, 0.15);
    --input-bg: rgba(255, 255, 255, 0.08);
    --input-border: rgba(255, 255, 255, 0.1);
    --response-bg: rgba(0, 0, 0, 0.5);
    --tab-bg: rgba(255, 255, 255, 0.05);
    --tab-active-bg: rgba(255, 255, 255, 0.15);
    --status-bg: rgba(255, 255, 255, 0.15);
    
    /* Alert Boxes - Dark Mode */
    --info-bg: rgba(97, 175, 254, 0.15);
    --warning-bg: rgba(252, 161, 48, 0.15);
    --success-bg: rgba(73, 204, 144, 0.15);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */

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

body {
    font-family: 'Merriweather', serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ==========================================
   GLASS MORPHISM EFFECTS
   ========================================== */

.glass {
    background: var(--glass-card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: visible;
    padding: 30px;
    margin-bottom: 30px;
    isolation: isolate;
}

.glass > * {
    position: relative;
    z-index: 1;
}

.glass::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 8s infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.dark-mode .glass::before {
    opacity: 1;
}

@keyframes shimmer {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(180deg); }
}

/* ==========================================
   THEME TOGGLE BUTTON
   ========================================== */

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    font-family: 'Merriweather', serif;
    font-size: 0.9rem;
    color: var(--text-color);
}

.theme-toggle:hover {
    background: var(--accent);
    color: var(--bg-color);
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--accent);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Resume-specific h1 styling */
.resume h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

h2 {
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

/* Resume-specific h2 with underlined decoration */
h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent);
}

h3 {
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 15px;
}

h4 {
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

p {
    margin-bottom: 1rem;
}

/* ==========================================
   CODE BLOCKS
   ========================================== */

code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--text-color);
    font-size: 0.9em;
}

pre {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
}

pre code {
    background: none;
    padding: 0;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn-primary {
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: var(--tab-active-bg);
}

/* ==========================================
   FORMS
   ========================================== */

.form-control,
.form-select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    border-radius: 8px;
    padding: 10px 15px;
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    background: var(--input-bg);
    border-color: var(--text-color);
    color: var(--text-color);
    outline: none;
    box-shadow: 0 0 0 0.25rem var(--glass-border);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

/* ==========================================
   TABLES
   ========================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    background: var(--glass-bg);
    font-weight: 600;
    color: var(--text-color);
}

td {
    color: var(--text-secondary);
}

/* ==========================================
   NAVIGATION
   ========================================== */

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
    margin-right: 10px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: var(--glass-bg);
    color: var(--text-color);
}

/* ==========================================
   ALERT BOXES
   ========================================== */

.info-box {
    background: var(--info-bg);
    border-left: 4px solid var(--info-border);
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.warning-box {
    background: var(--warning-bg);
    border-left: 4px solid var(--warning-border);
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.success-box {
    background: var(--success-bg);
    border-left: 4px solid var(--success-border);
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

/* ==========================================
   BADGES & TAGS
   ========================================== */

.endpoint-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-right: 10px;
}

.badge-post {
    background: #49cc90;
    color: #000;
}

.badge-get {
    background: #61affe;
    color: #000;
}

.badge-put {
    background: #fca130;
    color: #000;
}

.badge-delete {
    background: #f93e3e;
    color: #fff;
}

.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin: 2px;
    background: var(--status-bg);
}

/* ==========================================
   TABS
   ========================================== */

.method-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.method-tab {
    padding: 10px 20px;
    border-radius: 8px 8px 0 0;
    background: var(--tab-bg);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-color);
}

.method-tab.active {
    background: var(--tab-active-bg);
    border-bottom-color: transparent;
}

.method-tab:hover {
    background: var(--tab-active-bg);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==========================================
   RESPONSE BOX
   ========================================== */

.response-box {
    background: var(--response-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    font-size: 0.9rem;
    max-height: 500px;
    overflow-y: auto;
    color: var(--text-color);
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.container-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    .theme-toggle {
        top: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .glass {
        padding: 20px;
    }
    
    .method-tabs {
        flex-direction: column;
    }
    
    .method-tab {
        border-radius: 8px;
    }
}

/* ==========================================
   RESUME PAGE SPECIFIC STYLES
   ========================================== */

/* Card Styles */
.card-glass {
    background: var(--glass-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card-glass:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--accent);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 20px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
}

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

/* Expandable Timeline */
.timeline-container {
    position: relative;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--glass-card);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    border-color: var(--accent);
}

.timeline-header {
    display: flex;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    user-select: none;
    gap: 20px;
}

.timeline-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--skill-bg);
    padding: 8px;
    border: 1px solid var(--skill-border);
}

.timeline-header-content {
    flex: 1;
}

.timeline-company {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 5px;
}

.timeline-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

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

.timeline-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.expand-icon {
    font-size: 1.5rem;
    color: var(--accent);
    transition: transform 0.3s ease;
}

.timeline-item.expanded .expand-icon {
    transform: rotate(180deg);
}

.timeline-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    padding: 0 20px;
}

.timeline-item.expanded .timeline-details {
    max-height: 2000px;
    padding: 20px;
    border-top: 1px solid var(--glass-border);
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.tech-section {
    margin-top: 20px;
}

.tech-section h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--accent);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: var(--skill-bg);
    border: 1px solid var(--skill-border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-color);
}

/* Skills */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.skill-badge {
    background: var(--skill-bg);
    border: 1px solid var(--skill-border);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    color: var(--text-color);
}

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

/* Projects */
.project-card {
    padding: 30px;
    margin-bottom: 30px;
}

.project-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.project-link:hover {
    opacity: 0.8;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.features-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Availability */
.availability-card {
    text-align: center;
    padding: 40px;
}

.availability-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.availability-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 2;
}

/* Easter Egg API Link */
.api-easter-egg {
    font-size: 0.85rem;
    font-style: italic;
    cursor: default;
    color: var(--text-secondary);
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.api-easter-egg:hover {
    opacity: 0.7;
}

.api-easter-egg-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.api-easter-egg-link:hover {
    opacity: 1;
    border-bottom-style: solid;
}

/* Opportunities Button Hover */
button:hover {
    background: var(--tab-active-bg) !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 5000px;
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid var(--glass-border);
    margin-top: 80px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--accent);
}

/* GitHub Disclaimer */
.github-disclaimer {
    background: var(--skill-bg);
    border-left: 3px solid var(--glass-border);
    padding: 15px 20px;
    margin: 20px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-radius: 0 8px 8px 0;
}

/* Section spacing */
.section {
    margin-bottom: 60px;
}

/* Resume-specific responsive styles */
@media (max-width: 768px) {
    .hero {
        padding: 40px 15px;
        margin-bottom: 40px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .timeline-logo {
        width: 50px;
        height: 50px;
    }
    
    .timeline-company {
        font-size: 1.1rem;
    }
    
    .timeline-title {
        font-size: 1rem;
    }
    
    .project-card {
        padding: 20px;
    }
    
    .project-name {
        font-size: 1.4rem;
    }
    
    .skill-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
    
    .tech-tag {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
    
    .card-glass {
        padding: 20px;
    }
    
    .section {
        margin-bottom: 40px;
    }
    
    .availability-card {
        padding: 30px 20px;
    }
    
    .availability-title {
        font-size: 1.4rem;
    }
    
    .availability-text {
        font-size: 1rem;
    }
    
    /* Better button sizing for mobile */
    a[href="mailto:"], 
    .project-link,
    button {
        font-size: 0.95rem;
        padding: 10px 20px;
    }
    
    /* Stack elements better on mobile */
    .social-links {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Adjust logo sizes */
    img[src*="logo"] {
        max-width: 150px !important;
        max-height: 60px !important;
    }
    
    /* Better spacing for lists */
    .features-list li {
        padding: 6px 0;
        font-size: 0.9rem;
    }
    
    /* Adjust timeline summary */
    .timeline-summary {
        font-size: 0.85rem;
    }
    
    /* Fix specific flex layouts on mobile */
    .hero > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    /* Stack opportunity badges */
    .glass > div > div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    /* Better availability section on mobile */
    .availability-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .availability-header > a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Better text wrapping */
    p, .hero-subtitle {
        word-wrap: break-word;
    }
    
    /* Center logos */
    img[src*="logo"] {
        display: block;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .skill-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .container-main {
        padding: 15px 10px;
    }
}

